Issue
I am trying to change the tab background color of the SlidingTabLayout described in (https://developer.android.com/samples/SlidingTabsBasic/src/com.example.android.common/view/SlidingTabLayout.html).
I managed to get the entire thing working. But when I change the tabresource color on line 183 for example:
textView.setBackgroundResource(R.color.white);
The background of the tab becomes white, but the indicator does not appear at all.
Can someone please advise on how to just change the background color but have the indicator work as usual?
Thank you.
Solution
Can't believe I missed this.
Put this in the constructor:
this.setBackgroundColor(context.getResources().getColor(R.color.tabBgColor));
Answered By - AndroidP
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.