如何在我的新应用中使用Android原生图标?

时间:2022-08-16 07:14:35

I'm writing a new Android app.

我正在写一个新的Android应用程序。

How can I use Android native icons in it, such as Edit pencil icon?

如何在其中使用Android原生图标,例如编辑铅笔图标?

1 个解决方案

#1


7  

if you want to use end-user native android-os icon you must use this resources: for java code:

如果你想使用最终用户原生android-os图标你必须使用这个资源:对于java代码:

android.R.drawable.ic_input_delete

and in your layout xml files:

并在您的布局xml文件中:

        <ImageView
        android:id="@+id/ivImage"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:src="@android:drawable/ic_delete" />

and if you want access to physically address of native android icons in your pc go to tthe this address: android-sdk/platforms/[CHOOSE ANDROID VERSION]/data/res/

如果你想访问你电脑中原生android图标的物理地址,请转到这个地址:android-sdk / platforms / [CHOOSE ANDROID VERSION] / data / res /

#1


7  

if you want to use end-user native android-os icon you must use this resources: for java code:

如果你想使用最终用户原生android-os图标你必须使用这个资源:对于java代码:

android.R.drawable.ic_input_delete

and in your layout xml files:

并在您的布局xml文件中:

        <ImageView
        android:id="@+id/ivImage"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:src="@android:drawable/ic_delete" />

and if you want access to physically address of native android icons in your pc go to tthe this address: android-sdk/platforms/[CHOOSE ANDROID VERSION]/data/res/

如果你想访问你电脑中原生android图标的物理地址,请转到这个地址:android-sdk / platforms / [CHOOSE ANDROID VERSION] / data / res /