Adding a Layout to bottom of the screen inside a ScrollView in Landscape mode
- by andreea
I have the following layout which works in Portrait mode: the Layout with the id LinearLayout02 is placed at the bottom of the screen.
The problem appears when flipping to Lanscape mode, when the #LinearLayout02 is placed at the top of the screen.
The question is how do I position #LinearLayout02 at the bottom of the screen in both Portrait and Landscape mode?
(This happens on G1 and Xperia)
Thank you
The following code is placed inside a ScrollView android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:fillViewport="true"
<LinearLayout
android:id="@+id/sLayout"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
android:paddingTop="2dip"
android:layout_alignParentTop="true"
android:gravity="top" >
.....
</LinearLayout>
<LinearLayout
android:id="@+id/LinearLayout02"
android:background="@drawable/bottombar_bg"
android:layout_width="fill_parent"
android:paddingTop="10dip"
android:layout_height="56dip"
android:layout_alignParentBottom="true"
android:gravity="bottom" >
<Button
android:id="@+id/navigate"
style="@style/mainBottomTabsButtonNormal"
android:drawableLeft="@drawable/icon_navigation"
android:text="@string/navigationSettings"
android:layout_gravity="left">
</Button>
<Button
android:id="@+id/search"
style="@style/mainBottomTabsButtonActive"
android:drawableLeft="@drawable/icon_search"
android:text="@string/search.label"
android:layout_gravity="right">
</Button>
</LinearLayout>
</RelativeLayout>