Android: How to use existing graphic elements
-
06-07-2019 - |
Question
I would like to create a user interface which would contain network indication icons (3G, WiFi...) and I would like to use existing graphic elements which are displayed in notification bar.
Does anyone know how to get these existing elements and use it in custom layout?
I guess these icons are all ImageView elements and I am wondering whether it is possible to retrieve them with findViewById()
method.
Solution
They are drawables in android.R.drawable. There is a list of avaiable drawables for 1.0 at drawable list
OTHER TIPS
You can go to http://source.android.com/download to get instructions on how to download Android sources (images/drawables included), search for *.pngs and then reference the ones you need like this: getResources().getDrawable(android.R.drawable.ic_menu_save).
P.S. At least some of the drawables come with sdk: $SDK_PATH\platforms\android-1.5\data\res\drawable