I am having issues with layout for Xoom Tablet. Basically, I want one fragment (ListView) on the left side and the other fragment right to the ListView Fragment. But, I am having two issues on this.
Firstly, I dont want to hard code the android:layout_width for the listview fragment which is set to 200dip (Refer code below). I tried wrap_content, fill_parent but it didnt work for me.
Secondly, this UI is not rendered on the whole screen. Its only capturing a small portion of the whole tablet screen. Even hard coding from fill_parent to other values din’t have any effect.
The code is as shown below. I would really appreciate any sort of help on this problem.
~Thank you !!
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment class="com.example.android.apis.app.FragmentLayout$TitlesFragment"
android:id="@+id/titles" android:layout_width="200dip"
android:layout_alignParentLeft="true"
android:layout_height="match_parent" />
<FrameLayout android:id="@+id/details"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_toRightOf="@id/titles"
android:background="?android:attr/detailsElementBackground" />
</RelativeLayout>
instead of hardcoding you can set the layout weight of each framelayout. ie
Not sure why your UI isn’t taking up the entire screen. Are you supporting largeScreens, there is a setting in the manifest.