How to use the built-in Android icons

I want to use the built-in Android icons, I do not know how, I tried to use these two lines:

android:background="@drawable/ic_lock_silent_mode_off" android:background="R.drawable.ic_lock_silent_mode_off" 

Both lines do not work for me, how can I use this icon for my button?

I get this error:

 error: Error: No resource found that matches the given name (at 'background' with value '@drawable/ic_lock_silent_mode_off'). 
+6
source share
1 answer

With this, you are trying to reference your own, not Android.

You need to use:

 android:background="@android:drawable/ic_lock_silent_mode_off" 
+11
source

Source: https://habr.com/ru/post/971999/


All Articles