Questions tagged [android-tabs]

android-tabs refers to the interface for the tabbed window view of an Android device

1233 questions
144
votes
13 answers

How do I change a tab background color when using TabLayout?

This is my code in the main activity public class FilterActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_filter); …
Joel Lara
  • 1,541
  • 2
  • 10
  • 7
73
votes
9 answers

How to change selected Tab Text color using TabLayout from code in Android?

I'm using android.support.widget.TabLayout to make a Tab view, and I want to change the selected tabs text color from code (not from xml or by styling). How can I do this ?
rastha67
  • 851
  • 1
  • 6
  • 13
70
votes
13 answers

Tablayout with icons only

I am using design support to create tabs. I am also using ViewPager for swipable tabs. Now, I don't know how to use only icons instead of texts in tabs. I tried finding out but didn't get any success. My code: Toolbar toolbar; private TabLayout…
androGuy
  • 855
  • 2
  • 8
  • 11
65
votes
9 answers

TabWidget current tab bottom line color

I have a TabWidget for which I have enabled and set the stripLeft and…
neo108
  • 5,156
  • 3
  • 27
  • 41
52
votes
5 answers

Disable swiping between tabs

I set up sliding tabs with two Fragments each Fragment has a Button which goes to a WebView. The problem with this is when the WebView Button is clicked the sliding tabs are still activated and when a user tries to navigate within the WebView you…
Darragh O'Flaherty
  • 995
  • 3
  • 13
  • 30
45
votes
6 answers

How to style the divider between Ice Cream Sandwich tabs?

I'm using the following style together with a set of nine patch images to create a red line at the bottom of some Ice Cream Sandwich tabs instead of the standard blue line: