Where are all the standard Android icon resources?

前端 未结 8 1442
暗喜
暗喜 2020-12-04 20:53

I have just started writing my first ever Java/Android application, so forgive the total n00b question.

How do you access the the standard operating system icons suc

8条回答
  •  悲&欢浪女
    2020-12-04 21:18

    You can find the android.R.drawable images in your local SDK folder. (Tested using Android Studio 3.0)

    First have a look at the docs for the names of the drawables here: https://developer.android.com/reference/android/R.drawable.html

    Second either search your drive for one of those image names.png or type in the name of any of them into your Android Studio activity and right click (goto declaration) on it to view the image. Then you can also right click that image to copy the path. Then open that folder and look at all the PNG's there.

    Example on windows 10: android.R.drawable.star_big_on is located in user/AppData/Local/Android/Sdk/platforms/android-25/data/res/drawable-hdpi/star_big_on.png

    (Note also on windows AppData is a hidden folder so you may need to set your windows explorer to show hidden if you are clicking to open each folder)

    Also if you need to see material design icons / descriptions this is a good place to look: https://material.io/icons

提交回复
热议问题