I have a problem in one of my apps. I have a viewpage with two tabs that show different content. In my phone this tabs habe the full width of the phone. But in tablet the are a black space at both side of the screen. In the example you can see what i am talking about. Any help? Thx in advance.
Asked
Active
Viewed 65 times
2 Answers
0
I think that you use center gravity in your app tab layout, if the case replace app:tabGravity=”center” to app:tabGravity=”fill” in your tab Layout

E.Abdel
- 1,992
- 1
- 13
- 24
-
I tried this, changing styles.xml and it didn't work :(... Thx for the help Abdel. – kartGIS Oct 26 '15 at 06:12
-
Are your tried to set your tabLayout width to match_parent? – E.Abdel Oct 26 '15 at 09:07
0
Thx for all! I solve it using in activityMain.java onCreate method.
actionBar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.bluedark)));

kartGIS
- 667
- 1
- 6
- 10