tabhost 按住的效果

m_tabHost.getTabWidget().getChildAt(i)
.setBackgroundResource(R.drawable.selector_tab_background);

<?xml version="1.0" encoding="utf-8"?>
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
   
   
     <item
        android:state_pressed="true"
        android:drawable="@drawable/tab_item_p"/>
       
    <item
        android:state_selected="true"
        android:drawable="@drawable/tab_item_d"/>
   
</selector>

你可能感兴趣的:(tabhost)