I'm creating an app which I will use a layout like this
Black - Tablet Screen | Purple - Menu | Light Blue - ListView 1 | Blue - Content | Red - ListView 2
And after I choose an option from Listview 1, my layout needs to be like this another image
Black - Tablet Screen | Purple - Menu | Light Blue - ListView 1 | Blue - Content | Red - ListView 2
So, how I create my layout bigger than tablet screen (using XML) and just do something that will hide/show Listview 1 or Listview 2 to work using any tablet?
Thanks and regards!
ListView
in your XML (I'll assume you use left_list
and right_list
for IDs), preferably in a LinearLayout
with your content view and the content view has layout_weight="1"
android:visibility='gone'
to your XML for right_list
left_list
and right_list
in your Activity
(I'll assume these are leftList
and rightList
leftList.setVisibility(View.GONE); rightList.setVisibility(View.VISIBLE)
leftList.setVisibility(View.GONE); rightList.setVisibility(View.VISIBLE)
to trigger the visibility to change.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.