How do I apply the default theming to views in an android IME? -


i experimenting own android input method, @ moment having trouble styling / theming. problem following:

the view inflate , return in oncreateinputview contains plain android buttons. can listen onclick events on these buttons , works fine, when click buttons, looks don't change, meaning don't change background color etc. normal android buttons do.

i can, however, apply custom background xml containing selector:

styles.xml:

<style name="categorybutton">         <item name="android:background">@drawable/button</item> </style> 

button.xml:

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

this works , buttons react user input. however, buttons not views plan on using, , difficult replicate default android looks. tried finding way. thinking view missing default theme, applied following background it:

<style name="categorybutton">             <item name="android:background">@android:drawable/btn_default</item>  </style> 

but didn't show effect. interested, here contents of @android:drawable/btn_default:

<selector xmlns:android="http://schemas.android.com/apk/res/android">     <item android:state_window_focused="false" android:state_enabled="true"         android:drawable="@drawable/btn_default_normal" />     <item android:state_window_focused="false" android:state_enabled="false"         android:drawable="@drawable/btn_default_normal_disable" />     <item android:state_pressed="true"          android:drawable="@drawable/btn_default_pressed" />     <item android:state_focused="true" android:state_enabled="true"         android:drawable="@drawable/btn_default_selected" />     <item android:state_enabled="true"         android:drawable="@drawable/btn_default_normal" />     <item android:state_focused="true"         android:drawable="@drawable/btn_default_normal_disable_focused" />     <item          android:drawable="@drawable/btn_default_normal_disable" /> </selector> 

however, cannot find drawables states refer to. might problem? have suggestions on how apply default theme of views in ime?

thank much!


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -