Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have a look on <a href="http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/res/res/drawable/btn_default.xml;hb=HEAD" rel="noreferrer">how button is styled</a> by Android:</p> <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/btn_default_normal" /&gt; &lt;item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/btn_default_normal_disable" /&gt; &lt;item android:state_pressed="true" android:drawable="@drawable/btn_default_pressed" /&gt; &lt;item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_default_selected" /&gt; &lt;item android:state_enabled="true" android:drawable="@drawable/btn_default_normal" /&gt; &lt;item android:state_focused="true" android:drawable="@drawable/btn_default_normal_disable_focused" /&gt; &lt;item android:drawable="@drawable/btn_default_normal_disable" /&gt; &lt;/selector&gt; </code></pre> <p>To style your button with Android's themes images resources, just create your own selector by copying the Android's one and replace all <code>@drawable/btn_default_*</code> by <code>@android:drawable/btn_default_normal</code> in <code>item</code>s tag (and just remove <code>item</code>s you don't want). For example :</p> <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:state_enabled="true" android:drawable="@android:drawable/btn_default_normal" /&gt; &lt;/selector&gt; </code></pre> <p>Then, apply this drawable selector as a <code>android:background</code> of your button.</p> <p>Hope it helps.</p> <p>(If you want, I can also provide an example of applying this background easily to all your buttons, just ask.)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload