활동 전환 (예 : 분할보기) 사이에 변경되지 않는 왼쪽에 세로 막대가있는 활동을 만들고 싶습니다. 조각으로이 작업을 수행 할 수 있지만 HoneyComb 이전의 장치에 대한 지원을 추가해야합니다.조각을 사용하지 않고 안드로이드 사이드 바 탐색
다음과 같은 레이아웃을 사용해 보았습니다.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<LinearLayout android:layout_width="320dip"
android:layout_height="match_parent"
android:id="@+id/navLay"
>
<ListView
android:id="@+id/navList"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/contentLay"
><ListView
android:id="@+id/contentList"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
</LinearLayout>
그러나 첫 번째 목록은 활동 전환시에도 업데이트됩니다. 나는 오른쪽 목록의 데이터 소스가 다르다는 것을 제외하고는 활동이 동일한 활동임을 주목하고 싶다. 따라서 탐색하는 동안 왼쪽 탐색 모음의 상태와 내용을 저장할 수 있다면 꽤 좋을 것입니다. 어떤 도움을 주시면 감사하겠습니다.
지원 패키지를 사용하지 않고 다른 옵션이 있습니까? – ikbal
'Fragment'가 가장 쉬운 방법입니다. 그 이유를 알고 싶다면 탭 레이아웃 (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html)을 사용할 수 있습니다. 방법을 확인 [수직 탭 모음 만들기] (http://stackoverflow.com/q/5875644/1321873) – Rajesh