Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replicating actionbar embedded tabs

I have designed an app, that replicates the way Android embeds tabs in the actionbar, when there is room for it. In the two images below, you can see how the bottom part is in two panes in portrait mode, and becomes one single pane in landscape mode.

Non-embedded

Embedded

What I want to do: Change to single pane layout whenever the actionbar changes to embedded mode, and to the two pane layout when the actionbar is not in embedded mode.

What I have done so far: Put the two pane mode in the "layout"-folder and the single pane mode in the "layout-land"-folder. However, I am not quite sure, that this will replicate the actionbar behaviour. I would imagine, that big screen devices would show the embedded mode even when in portrait mode.

So, does anyone know exactly which parameters change the actionbar from non-embedded to embedded, and whether this could be fixed simply by adding some other qualifiers to the layout-folders name?

like image 697
Mads Frandsen Avatar asked Nov 12 '22 04:11

Mads Frandsen


1 Answers

ActionBarSherlock which, I believe, replicates native ActionBar's behavior checks R.bool.abs__action_bar_embed_tabs resource. And this resource is true only for values-w480 configuration.

like image 74
kriomant Avatar answered Nov 15 '22 13:11

kriomant