简体   繁体   English

如何为Android Activity创建图标?

[英]How to make an icon for Android Activity?

I can't find anywhere how to get my icon into my activity. 我在任何地方都找不到如何将我的图标添加到活动中的方法。 I followed the guidelines to make all the different resolutions, now what? 我遵循了指导方针以做出所有不同的决议,现在该怎么办?

Make icons of the appropriate dimensions and place in these locations 制作合适尺寸的图标并放置在这些位置

72 x 72px png in res/drawable-hdpi res / drawable-hdpi中的72 x 72px png
48 x 48px png in res/drawable-mdpi res / drawable-mdpi中为48 x 48px png
36 x 36px png in res/drawable-ldpi res / drawable-ldpi中为36 x 36px png

Make sure they all have the same name, in the example below all would be called ic_logo.png. 确保它们都具有相同的名称,在下面的示例中,所有这些都将称为ic_logo.png。

Now edit AndroidManifest.xml to point to your icon. 现在,编辑AndroidManifest.xml以指向您的图标。
<application android:icon="@drawable/ic_logo" android:label="@string/app_name" android:theme="@android:style/Theme.Holo">

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使Android应用程序的图标背景透明? - How to make the icon background of an Android app transparent? 如何在Android代码的第二个活动的每行中插入电话图标 - How to insert Phone icon in every line in second Activity in Android code 如何个性化android的全屏活动 - How to make personalize fullscreen activity of android 如何使我的简单活动成为android-studio中的浮动活动? - How to make my simple activity as floating activity in android-studio? Android:如何向使用android.R.layout.activity_list_item的NAvigationDrawer中添加图标 - Android: How to add icon to NAvigationDrawer that uses android.R.layout.activity_list_item 在我的标签式活动中添加图标(android studio) - Add icon in my tabbed activity (android studio) 你如何在 android 中创建一个按钮来打开一个新的活动,这个活动不仅仅是一个默认活动,它是一个自定义活动 - How do you make a button in android that opens a new activity and this activity is not just a default activity its a custom one 如何使android菜单图标和菜单项变大 - how to make android menu icon and menu items larger 如何使应用程序的启动图标运行首选项活动? - How do I make an applcation's launch icon run the preferences activity? 如何制作带有图标,标题和描述的列表菜单以打开每个listView项的另一个单独的活动? - How to make a List Menu with Icon, Title, and a Description to open Another separate activity for each listView item?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM