stu14t Active Member Licensed User Longtime User Feb 22, 2014 #1 I have an app that runs on a phone size platform using a Tabhost (4 tabs) I have copied all the views from each layout and can get them all to fit on a single layout for a 7" and 10" tabs without the tabhost. I've done a search but can't seem to find what I'm looking for on how to handle these contrasting layouts. e.g making sure the correct view loads for each variant.
I have an app that runs on a phone size platform using a Tabhost (4 tabs) I have copied all the views from each layout and can get them all to fit on a single layout for a 7" and 10" tabs without the tabhost. I've done a search but can't seem to find what I'm looking for on how to handle these contrasting layouts. e.g making sure the correct view loads for each variant.
klaus Expert Licensed User Longtime User Feb 22, 2014 #2 I have done it like this: Code: Copy Dim lv As LayoutValues lv = GetDeviceLayoutValues DeviceSize = lv.ApproximateScreenSize If DeviceSize >= 6 Then ' code for tablets Else ' code for phones End If Upvote 0
I have done it like this: Code: Copy Dim lv As LayoutValues lv = GetDeviceLayoutValues DeviceSize = lv.ApproximateScreenSize If DeviceSize >= 6 Then ' code for tablets Else ' code for phones End If
stu14t Active Member Licensed User Longtime User Feb 22, 2014 #3 Ideal, Many thanks Klaus. Exactly what I need but wasn't sure how to handle loading the correct layout. Is there a table for the deice sizes for future reference? Upvote 0
Ideal, Many thanks Klaus. Exactly what I need but wasn't sure how to handle loading the correct layout. Is there a table for the deice sizes for future reference?
klaus Expert Licensed User Longtime User Feb 22, 2014 #4 Not that I know. Every time new screen sizes apear. Upvote 0
stu14t Active Member Licensed User Longtime User Feb 22, 2014 #5 Thanks Klaus, works a treat but now all the tab orders are wrong Oh well, you cant have everything Upvote 0
klaus Expert Licensed User Longtime User Feb 22, 2014 #6 ... works a treat but now all the tab orders are wrong Click to expand... Which tab order do you mean ? Upvote 0
... works a treat but now all the tab orders are wrong Click to expand... Which tab order do you mean ?
stu14t Active Member Licensed User Longtime User Feb 22, 2014 #7 Between the EditTexts. I've sorted it out using the Field Order class What I said was slightly misleading, I was using TAB order in the old VB sense not Tabs from the Tabhost Upvote 0
Between the EditTexts. I've sorted it out using the Field Order class What I said was slightly misleading, I was using TAB order in the old VB sense not Tabs from the Tabhost