android:id="@+id/linearlay1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context="com.example.timetable.SecondTab" >
<ListView
android:id="@+id/dataListView1"
android:layout_weight="0.75"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
</ListView>
<LinearLayout
android:id="@+id/splitactionbar2"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.25"
android:layout_marginBottom="0dp"
android:background="#000000"
android:gravity="bottom"
android:orientation="horizontal" >
<Button
android:id="@+id/setting2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#ffffff"
android:text="setting" />
<Button
android:id="@+id/refresh2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="refresh"
android:textColor="#ffffff" />
</LinearLayout>
</LinearLayout>
이건 코드고요,...
제가 화면의 하단에 메뉴바 처럼 고정시키고 싶은대..;;
리스트 뷰의 크기에 따라서 splitactionbar2 이 레이아웃의 위치가 달라지더라구요..;
별 짓을 다해봤는대..;; 안되더라구요..;;
해본 짓.
1. 전체를 framlayuot으로 감싸고 하단의 레이아웃에 gravity를 bottom으로 준다.- fail...;;
2. layout_weight을 사용하여 listview 0.7 // splitactionbar2 0.3으로 비율을 나눠준다. -fail..;;
3. 각종 레이아웃들의 속성을 변경해본다.;; fail....
원래는.....아래의 속성을 사용해서 해결하려 했으나..
알아보니 저거는 가로의 해상도가 400dip 이하의 스마트폰에서만
된다더군요...;; ㅠㅠ
(잘은 알아보지는 못했지만.. deprecated됬다는 것 같기도하고..;;)
혹시 레이아웃을 하단에 고정시키는 방법을 아시거나(리스트뷰의 크기와 상관없이..;;)
split actionbar 같은 효과를 낼 수 있는 방법을 아신다면... 도와주세요,.ㅜㅜ
<manifest ...>
<activity uiOptions="splitActionBarWhenNarrow" ... >
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
</activity>
</manifest>