android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="76px"
android:gravity="center_vertical"
android:background="@drawable/matching_title_bg"
>
<ImageView
android:layout_width="50px"
android:layout_height="50px"
android:layout_margin="10px"
android:background="@drawable/matching_list_icon_matching"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:layout_weight="1"
>
<ListView
android:id="@+id/leftList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
<ListView
android:id="@+id/rightList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
</LinearLayout>
-------------------------------------------------------------------
| ImageView |
-------------------------------------------------------------------
| | |
| ListView | ListView |
| | |
| | |
-------------------------------------------------------------------
이런식으로 나오는데요..
저기에다가
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="76px"
android:gravity="center_vertical"
android:background="@drawable/matching_title_bg"
>
<ImageView
android:layout_width="50px"
android:layout_height="50px"
android:layout_margin="10px"
android:background="@drawable/matching_list_icon_matching"
/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<ScrollView
layout_width="fill_parent"
layout_height="fill_parent"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" <-- wrap_content로 바꿔도 안됨
android:orientation="horizontal"
>
<ListView
android:id="@+id/leftList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
<ListView
android:id="@+id/rightList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
</LinearLayout>
</ScrollView>
</LinearLayout>
-------------------------------------------------------------------
| ImageView |
-------------------------------------------------------------------
| | |
| ListView | ListView |
-------------------------------------------------------------------
| 빈공간 |
| |
-------------------------------------------------------------------
왜 이렇게 나올까요???
빈공간 없이 첫번째 처럼 나오고 ListView를 감싸고 있는 LinearLayout에 스크롤 주려고 하는데 잘 안되요 ㅡㅜ
부탁드립니다 답변 좀 주세요~~~~
참고로 위 레이아웃 형태로 잡으시면 문제의 소지가 있습니다.
ScrollView와 ListView를 동시에 사용할 시 문제에 대해 검색해보세요.
레이아웃을 변경하시는게...
제가 하려는게 ListView 2개를 이용해서 각각 스크롤 하다가 어떤 버튼을 클릭하면
ListView 제각각 스크롤 되는거를 막고 스크롤이 하나인것처럼 동시에 움직이게 하려고 하는데
이것저것 하다가 버튼을 클릭했을때 ListView를 enable 시키고 ScrollView의 스크롤을 활성화 시켜서
구현하면 되지 않을까 싶어서 저렇게 해보고 있습니다..
다른 방법이 있을까요?
한쪽에 onTouchListener를 걸고 그 안에서 다른 ListView로 dispatchTouchEvent를 써서 터치를 넘기면
하나인것처럼 동작은 합니다.
물론 itemClick이나 itemLongClick도 같이 발생할 테지만...
그래서 리스트뷰에 아이템을 adapter로 넣어주실때 임의의 높이값을 정해서 리스트뷰를 구성하셔야됩니다.
스크롤 뷰안에 그냥 리스트뷰를 넣으시면 리스트뷰의 스크롤 자체가 안먹힙니다.
ㅎㅎㅎㅎ 호로이드님 하나만 더 여쭤봐도 될까요??
홈키나 전화/문자가 와서 본의아니게 종료가 됐을때요
다시 어플 접속시에
어떤 페이지에서는 메인으로 가게 하고 .. 어떤페이지에서는 그냥 종료된 페이지 그대로 뜨게 하려고 하는데요..
AndroidManifest.xml에 android:clearTaskOnLaunch 이걸 설정해서 해봤는데
<activity android:name=".mode.TestActivity" clearTaskOnLaunch="true" android:theme="@style/LightNoTitle" android:screenOrientation="portrait" />
이렇게 설정하면 안먹드라고요 해당 Activity에만 적용을 하려고 했는데..
그래서 또 해본게 onWindowFocusChanged로 Event를 잡아내서 해봤는데 스택메모리 초기화를 못시켜서 메인으로
가게 하는데 실패했어요..한단게 전까지밖에 못가드라고요..
방법이 있을까요?




android:id="@+id/rightList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>