Fixed
Status Update
Comments
al...@android.com <al...@android.com>
ch...@google.com <ch...@google.com>
re...@gmail.com <re...@gmail.com> #2
Yup. Facing similar issue. The indicator gets hidden under the background.
ru...@gmail.com <ru...@gmail.com> #3
A workaround is to call TabLayout.setBackgroundColor() at runtime instead of specifying color in xml.
pa...@gmail.com <pa...@gmail.com> #4
Yeah, But now status for this issue is FutureRelease. So we can wait.
ru...@gmail.com <ru...@gmail.com> #5
Or you can use android:background, instead of app:tabBackground
ch...@google.com <ch...@google.com> #6
Released in v22.2.1.
ka...@gmail.com <ka...@gmail.com> #7
In my case this is still not working.
Only if i remove the tabBackground i can see the tabIndicatorColor.
I have tried as attributes:
app:tabBackground="@color/orange"
app:tabIndicatorColor="@color/yellow"
app:tabIndicatorHeight="@dimen/space_small"
and as styles:
<item name="tabBackground">@color/orange</item>
<item name="tabIndicatorColor">@color/yellow</item>
<item name="tabIndicatorHeight">@dimen/space_small</item>
Same negative result for both.
Only if i remove the tabBackground i can see the tabIndicatorColor.
I have tried as attributes:
app:tabBackground="@color/orange"
app:tabIndicatorColor="@color/yellow"
app:tabIndicatorHeight="@dimen/space_small"
and as styles:
<item name="tabBackground">@color/orange</item>
<item name="tabIndicatorColor">@color/yellow</item>
<item name="tabIndicatorHeight">@dimen/space_small</item>
Same negative result for both.
ch...@google.com <ch...@google.com> #8
I can't recreate. Make sure you're using v22.2.1.
ka...@gmail.com <ka...@gmail.com> #9
My bad, you are right. I had the old 22.2.0 in a this other branch.
It works as expected now.
It works as expected now.
ch...@google.com <ch...@google.com> #10
Phew.
cu...@gmail.com <cu...@gmail.com> #11
v22.2.1 bug!
text color blink when i fast speed change swipe to change tab.
color is:
<item name="tabTextColor">@color/text_color_accent_gray</item>
<item name="tabSelectedTextColor">@color/app_accent</item>
text color blink when i fast speed change swipe to change tab.
color is:
<item name="tabTextColor">@color/text_color_accent_gray</item>
<item name="tabSelectedTextColor">@color/app_accent</item>
ch...@google.com <ch...@google.com> #12
#13: Don't spam bugs with irrelevant comments. Search the tracker, there is already a bug for that.
s....@gmail.com <s....@gmail.com> #13
@chrisba are you sure the bug has been cleared in 22.2.1 ?. I still couldn't see the tab indicator when i set tab background color. I can see it's clearly the tab background hides the indicator bar.
ch...@google.com <ch...@google.com> #14
Yes, I'm sure.
[Deleted User] <[Deleted User]> #15
There is a bug in v 23.1.0 at TabLayout
when i changed the height of the indicator to be full height, it cover the tab name.
this is degradation from v 22.2.0.
I explored the root of the problem and here the results:
In v 22.2.0 they draw the indicator in onDraw() and this function called before view draw the children so the indicator draw below the text, but in v 23.1.0 they draw the indicator in draw() after calling to super.draw() so it draw after the view already draw its children and it cover the text.
please fix it
when i changed the height of the indicator to be full height, it cover the tab name.
this is degradation from v 22.2.0.
I explored the root of the problem and here the results:
In v 22.2.0 they draw the indicator in onDraw() and this function called before view draw the children so the indicator draw below the text, but in v 23.1.0 they draw the indicator in draw() after calling to super.draw() so it draw after the view already draw its children and it cover the text.
please fix it
ch...@google.com <ch...@google.com> #16
#17: That's working as intended.
[Deleted User] <[Deleted User]> #17
#18 i do not understand what do you mean "That's working as intended"? as i said if you change the indicator height using app:tabIndicatorHeight="48dp" it cover the text and you can not see the tab name.
Please specify what you mean.
Thanks
Please specify what you mean.
Thanks
ch...@google.com <ch...@google.com> #18
It means don't set the indicator height to overlap the text, that's not how it is designed to be used.
[Deleted User] <[Deleted User]> #19
#20 it is a degradation! and also the api allow to change the height, so you fixed one thing and brake another.
ch...@google.com <ch...@google.com> #20
Nothing is broken, it's working correctly and as expected.
Description
Version used: 22.2
<android.support.design.widget.TabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabBackground="@color/material_blue_grey_800"
app:tabIndicatorColor="@color/material_blue_grey_900"
app:tabIndicatorHeight="5dp"/>
Let's consider the above TabLayout.
Now when i specify tabIndicatorColor and tabBackground to TabLayout. Then, the tabIndicatorColor is not visible just because of tabBackgroud will overlap tabIndicatorColor. So When I use tabBackground , tabIndicatorColor is not visible.
But If specify only tabIndicatorColor then it is visible perfectly.