java - How to get rid of default bar under tab -


i've been trying customize tab bar of app. i've got working except part default blue thin line shows above custom drawable tabs. attach screenshot , xml styles.

tabbar

  1. styles.xml

    <?xml version="1.0" encoding="utf-8"?> <resources>     <style name="apptheme" parent="theme.appcompat.light.darkactionbar">         <!-- custom actionbar -->         <item name="android:actionbarstyle">@style/myactionbar</item>         <item name="android:actionmenutextcolor">@color/gray</item>          <item name="android:actionbartabstyle">@style/myactionbar.tabstyle</item>         <item name="android:actionbartabtextstyle">@style/myactionbar.tabtext</item>     </style>      <!-- custom actionbar -->     <style name="myactionbar" parent="@style/widget.appcompat.light.actionbar.solid.inverse">         <item name="android:background">@color/white</item>         <item name="android:backgroundstacked">@color/white</item>     </style>      <style name="myactionbar.titletext" parent="@style/textappearance.appcompat.widget.actionbar.title">         <item name="android:textcolor">@color/primary</item>     </style>      <style name="myactionbar.tabstyle" parent="@style/widget.appcompat.actionbar.tabview">         <item name="android:background">@drawable/tab_indicator_myactionbar</item>     </style>      <style name="myactionbar.tabtext" parent="@style/widget.appcompat.actionbar">         <item name="android:textcolor">@color/gray</item>     </style>  </resources> 
  2. drawable/tab_indicator_myactionbar.xml

    <?xml version="1.0" encoding="utf-8"?>  <selector xmlns:android="http://schemas.android.com/apk/res/android">      <!-- non focused -->     <item         android:state_focused="false"         android:state_selected="false"         android:state_pressed="false"         android:drawable="@android:color/transparent" />      <item         android:state_focused="false"         android:state_selected="true"         android:state_pressed="false"         android:drawable="@drawable/tab_selected_myactionbar" />     <!-- focused -->    <item        android:state_focused="true"        android:state_selected="false"        android:state_pressed="false"        android:drawable="@drawable/tab_focused_unselected_myactionbar" />     <item        android:state_focused="true"        android:state_selected="true"        android:state_pressed="false"        android:drawable="@drawable/tab_focused_selected_myactionbar" />     <!-- pressed -->    <!--    non focused -->    <item        android:state_focused="false"        android:state_selected="false"        android:state_pressed="true"        android:drawable="@drawable/tab_unselected_pressed_myactionbar" />     <item        android:state_focused="false"        android:state_selected="true"        android:state_pressed="true"        android:drawable="@drawable/tab_selected_pressed_myactionbar" />     <!--    focused -->    <item        android:state_focused="true"        android:state_selected="false"        android:state_pressed="true"        android:drawable="@drawable/tab_unselected_pressed_myactionbar" />     <item        android:state_focused="true"        android:state_selected="true"        android:state_pressed="true"        android:drawable="@drawable/tab_selected_pressed_myactionbar" />  </selector> 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -