Can you please tell me how can I use android's icon expander_ic_maximized? I find that in frameworks/base/core/res/res/drawable-hdpi/expanderic_minimized.9.png
Here is my layout xml file:
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/expander_ic_minimized">
But I get this error:
res/layout/test.xml:70: error: Error: Resource is not public. (at 'src' with value '@android:drawable/expander_ic_maximized').
You can find all android icons in your android SDK installation directory. F.ex. /opt/android-sdk-linux/platforms/android-16/data/res/drawable-hdpi/
on my computer. There are different sets of icons for different android versions and for different screen resolutions. Copy expander_ic_minimized.png
files to your project drawable
folders and the icon will become available.
According to android developer guide:
Because these resources can change between platform versions, you should not reference these icons using the Android platform resource IDs (i.e. menu icons under android.R.drawable). If you want to use any icons or other internal drawable resources, you should store a local copy of those icons or drawables in your application resources, then reference the local copy from your application code. In that way, you can maintain control over the appearance of your icons, even if the system's copy changes.
According to this thread, you will have to manually copy that icon into your project and use it from there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With