Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
0 answers
32 views

Tab ItemIndicator not visible - Android TabLayout

I'm trying to display a white tab indicator that's 1 dp in height and extends the full width of the tab. However, nothing is being displayed except the text layout.xml <com.google.android....
Da Chelimo's user avatar
1 vote
1 answer
175 views

Custom TabLayout like in Samsung Music App

The default TabLayout with mode set to scrollable gives the following: The position of the selected tab indicator is not fixed. If the first tab is selected, tab indicator is at the left most side of ...
Vikram Baliga's user avatar
2 votes
0 answers
252 views

How to remove Widget.Material3.TabLayout bottom divider

For a style using the Widget.Material3.TabLayout <style name="MyTabLayout" parent="Widget.Material3.TabLayout"> <item name="tabTextColor">@color/black</...
the_prole's user avatar
  • 8,755
1 vote
2 answers
1k views

How to make tabs items padding correctly?

I want to make custom tabs like this design in the image and I found an answer for that case on this question here but after applying it's solution I got the result in the image, what I want to do is ...
Amin's user avatar
  • 503
0 votes
2 answers
320 views

Why cannot I change the text color in the tabs of my Material TabLayout in Xamarin.Android?

I have integrated some tabs in my app, but the tabs keep the text color stays white even thought I have set some shades of gray in its colors: tabs.SetTabTextColors(Color.ParseColor("#bdbdbd"...
Federico Navarrete's user avatar
0 votes
0 answers
28 views

tab.setIcon(resId) not working after project upgraded in MDC Android

I have recently upgraded my project in Google Material Designing Component. I have used tab.setIcon(R.drawable.ic_test_icon) to set the icon. Now below icon is not working. but, working file before ...
Sayantan Basu's user avatar
1 vote
2 answers
247 views

Android TabLayout class not resolving

I cannot get TabLayout to resolve. I've tried implementing all the dependencies others have recommended for this issue, but it's still not working. Can anyone help? Is the issue that I'm trying to ...
Alexander Sloane's user avatar
0 votes
1 answer
1k views

Android TabLayout Indicator drawable color is not visible also unable to add custom width

I want to use custom drawable for TabLayout indicator like this but it is not showing the colors also unable to add custom width. As you can see that design has width that is not more than width of ...
Bills's user avatar
  • 798
0 votes
1 answer
2k views

TabItem icon not showing with Material Components 1.1.0

Just upgraded my application to Material Components 1.1.0 and the icons in my TabLayout no longer display. I followed the tutorial on the official website of google material.io, the preview in Android ...
mamenejr's user avatar
  • 325
1 vote
1 answer
676 views

Material TabLayout with TabItem : Ripple effect not working

In my layout i have a TabLayout with two TabItem above a ViewPager. It all works as expected, but when i tap on a TabItem for switch visible fragment, i have no ripple effect. This is my layout: <...
giozh's user avatar
  • 10.1k
3 votes
2 answers
914 views

Tabbar layout active tab textcolor is same as primary color

This is my style: <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> <!-- Customize your theme here. --> ...
BaRud's user avatar
  • 3,168
3 votes
2 answers
2k views

Class BadgeDrawable not found. How to use material design BadgeDrawable in Android

For the first time, I am trying to use the badge notification icon on the material TabItem. My goal is to show the badge with the total number of items in the RecyclerView. I was going through with ...
maddy23285's user avatar
14 votes
1 answer
4k views

TabLayoutMediator not preserving TabItem attributes

I have a simple setup using ViewPager2 and TabLayout with preset TabItems: ... <com.google.android.material.tabs.TabLayout android:id="@+id/tabs" android:...
Evgeni Roitburg's user avatar
0 votes
3 answers
2k views

Cannot resolve method 'setupWithViewPager(androidx.viewPager.widget.ViewPager)

I an learning android studio and was trying to make a simple app using fragments but I am getting the below error. error- Cannot resolve method 'setupWithViewPager(androidx.viewPager.widget.ViewPager)...
Random's user avatar
  • 11
0 votes
3 answers
3k views

Tabs titles on TabLayout not showing

Update: I modified my adapter class to the following, and it works fine now: public class SectionsPagerAdapter extends FragmentPagerAdapter { R.string.tab_text_2, R.string.tab_text_3}; //private ...
Laila Campos's user avatar

15 30 50 per page