android - Changing the tab indicator colour without changing the accent colour -


i have basic viewpager tabs shown below. nothing special it. contains tab indicator shows tab active (on web tab in image). default coloured theme's coloraccent.

how can change tab indicator different colour without altering theme's accent colour?

tab indicator example

i have tried altering style.xml without success.

<resources> <style name="apptheme" parent="theme.appcompat.light.darkactionbar">     <item name="colorprimary">@color/colorprimary</item>     <item name="colorprimarydark">@color/colorprimarydark</item>     <item name="coloraccent">@color/coloraccent</item>     vvvvv     <item name="android:tabwidgetstyle">@style/alternateaccentcustomization</item>     ^^^^^ </style>  <style name="apptheme.noactionbar">     <item name="windowactionbar">false</item>     <item name="windownotitle">true</item> </style>  <style name="apptheme.appbaroverlay" parent="themeoverlay.appcompat.dark.actionbar" /> <style name="apptheme.popupoverlay" parent="themeoverlay.appcompat.light" />  vvvvv <style name="alternateaccentcustomization" parent="theme.appcompat.light.dialog">     <item name="coloraccent">#ff4411</item>     <item name="tabindicatorcolor">#ff4411</item> </style> ^^^^^ 

the above not work, best guess far how make work.

if possible, hoping find theme based solution can apply tab layouts in app, opposed per instance solution such ones found here how change new tablayout indicator color , height


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -