Android: using framework drawables in custom button selector
<p>I'd need to create custom button, but I'd want to use framework's default button highlight colors for pressed and focused states. My question is similar to <a href="http://stackoverflow.com/questions/3686430/android-use-default-highlight-colors-in-a-custom-button">this one</a>.</p>

<p>My selector code looks like this:</p>

<pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item android:state_pressed="true" android:drawable="@android:drawable/grid_selector_background_pressed"/&gt;
    &lt;item android:state_focused="true" android:drawable="@android:drawable/grid_selector_background_focus"/&gt;
    &lt;item&gt;
        &lt;shape&gt;
            &lt;solid android:color="#EAEAEA"/&gt;
            &lt;stroke
                    android:width="0dp"
                    android:color="#A0A0A0"/&gt;
            &lt;corners
                    android:radius="0dp"/&gt;
            &lt;padding
                    android:left="10dp"
                    android:top="10dp"
                    android:right="10dp"
                    android:bottom="10dp"/&gt;
        &lt;/shape&gt;
    &lt;/item&gt;
&lt;/selector&gt;
</code></pre>

<p>So I'm basically trying to reference drawables <strong>grid_selector_background_pressed</strong> and <strong>grid_selector_background_focus</strong>. The dev environment does find those drawables as it auto-suggests them upon typing, but then gives "Resource is not public" when compiling.</p>

<p>Is there a way to use the above mentioned framework drawables?</p>

<p>Pom</p>
