Tab settings as an overlay on the tablet?

I use the Android action bar to show the settings as shown in the phone version.

enter image description here

when I click on the settings, it is called SettingsActivity, however in the Tablet version I have to show the Settings in a different format, as shown below.

enter image description here

Here, the Settings Icon should be displayed as an overlay on the box (on any screen) with the settings. How to do it? Are there any controls to display such an overlay? The internal settings page contains other controls, such as spinner, switch, etc.

+4
source share
1 answer

I would use Fragment and then find out if the user is using a tablet or smartphone . If it is a tablet, open SlidingMenu with an internal fragment, if it is a smartphone, open FragmentActivity with the same fragment inside. You can also customize the fragment to look a little different in different cases, using the layout folders.

+1
source

Source: https://habr.com/ru/post/1500680/


All Articles