Reputation: 4670
i want to make application in android Tablets like in ipad which have spliting screen,
How i can do that ? if any body have idea please send me!
Thank you in advance.
Upvotes: 1
Views: 1205
Reputation: 2285
This will be the fragment xml file. then you have to write two xml files for CustomerList(Left Part) and CustomerInfo(Right Part). your activity should extends FragmentActivity. try with this:::
<fragment class="ui.misc.Customers$CustomerList"
android:id="@+id/customerlistfragmant" android:layout_weight="1"
android:layout_width="550px"
android:layout_height="wrap_content"
/>
<fragment class="ui.misc.Customers$CustomerInfo"
android:id="@+id/customerinfofragmant" android:layout_weight="1"
android:layout_width="350px" android:layout_height="wrap_content" />
<FrameLayout android:id="@+id/regscreentwo" android:layout_weight="1"
android:layout_width="0px"
android:layout_height="fill_parent"
/>
</LinearLayout>
Upvotes: 1
Reputation: 15973
Using fragments: check http://mobile.tutsplus.com/tutorials/android/android-compatibility-working-with-fragments/
it's a tutorial with sample application that uses the compatibility package (allows you to support from API 4), it may help
Upvotes: 2
Reputation: 10190
this is not a 'feature' limited to iOS you can easily do this in Android by using two vertical LinearLayouts and assigning them equal weight - to split the screen into half or Different weights to achieve something like the image you provided.
And of course, there are a lot of other ways to do that.
Upvotes: 1
Reputation: 40203
This is achievable using the Fragments API. Fragments
are available since Android 3.0, but there's also a Support Library that lets you use these API's from Android 1.6. Hope this helps.
Upvotes: 4