Only some drawables are accessible via the
<ImageButton
src="@+android:drawable/
syntax. For example expander_ic_maximized is not accessible, yet its clearly at
http://androiddrawableexplorer.appspot.com/
its so frustrating to have to download the drawables and manually put them in my drawables folder....any ideas how to get around this???
In Android Studio inside the res folder, one can find the drawable folder, layout folder, mipmap folder, values folder, etc. Among them, the drawable folder contains the different types of images used for the development of the application.
A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon . There are several different types of drawables: Bitmap File.
Android SDK has all images unpacked in the %SDK-FOLDER%/platforms/android-*/data/res/drawable-*
folder. Just pick desired file and put it into your app resource.
I realize it's a bit more work, but as a workaround you could just set the image resource programatically.
findViewById(R.id.ImageButton1).setImageResource(android.R.drawable.expander_ic_maximized)
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