Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Action Bar Tabs do not fill screen width

I have an action bar with two tabs underneath. It looks alright in most smartphones, but in tablets or the nexus 4, for example, the tabs do not stretch to occupy the whole width of the screen.

Here's a screenshot (taken on a Nexus 4):

enter image description here

As can be seen, there are two black bars to each side of the tabs. I am using action bar sherlock. Is there a way to make tabs occupy full width? some kind of ABS atrribute I can override?

like image 908
LightSystem Avatar asked May 07 '13 09:05

LightSystem


1 Answers

I would recommend you use Android Sliding Tab, which is pieces of code from Google to do the same thing as you've shown. Since the 5.0 API, the Action Tab has been deprecated, so this is one good solution to this problem.

Maybe some actually link will be helpful.
Also this in action (Youtube)

like image 59
DeanK Avatar answered Oct 16 '22 17:10

DeanK