Android icon vs logo
来源:互联网 发布:日用品的网络分销 编辑:程序博客网 时间:2024/05/03 12:14
Android 配置文件中有icon和logo两个属性。那这两个属性有什么区别呢?
清单文件中activity的icon属性介绍:
android:icon
An icon representing the activity. The icon is displayed to users when a representation of the activity is required on-screen. For example, icons for activities that initiate tasks are displayed in the launcher window. The icon is often accompaniedby a label (see the android:label attribute).
This attribute must be set as a reference to a drawable resource containing theimage definition. If it is not set, the icon specified for the application as awhole is used instead (see the <application>element's icon attribute).
Theactivity's icon — whether set here or by the <application> element— is also the default icon for all the activity's intent filters (see the <intent-filter> element's icon attribute).
大体意思就是说icon代表了一个activity,它作为activity的界面显示展示给用户,比如说启动界面上MainActivity的图标。此外,它的属性值必须是一个drawable类型的资源文件。如果没有给activity定义,那么这个activity会使用application的icon属性。
下面是application的icon属性介绍:
android:icon
An iconfor the application as whole, and the default icon for each of theapplication's components. See the individual icon attributesfor <activity>, <activity-alias>, <service>, <receiver>,and <provider>elements.
This attribute must be set as a reference to a drawable resource containing the image (for example"@drawable/icon").There is no default icon.
同activity的icon属性类似,但是application的icon属性石没有默认值的。aplication的icon属性是用来显示在安装界面和安装包缩略图的,而不包括桌面和启动器图标。桌面、启动器上显示的图是应用的主activity(一般名称为MainActivity)里icon。
logo属性介绍:
android:logo
A logo for the application as whole, and the default logofor activities.
This attribute must be set as a reference to a drawableresource containing the image (for example"@drawable/logo"). There is no default logo.
logo不会被作为桌面图标,仅作为activity的导航图,而当同时设置了icon与logo属性时(闲的),logo会完全覆盖掉icon。
Using a logo instead ofan icon
By default, the systemuses your application icon in the action bar, as specified by the icon attribute in the<application> or <activity> element. However, if you also specifythe logo attribute, then the action bar usesthe logo image instead of the icon.
A logo should usually bewider than the icon, but should not include unnecessary text. You shouldgenerally use a logo only when it represents your brand in a traditional format that users recognize. A good example is the YouTube app's logo—the logorepresents the expected user brand, whereas the app's icon is a modifiedversion that conforms to the square requirement for the launcher icon.
ActionBar的应用:
ActionBar actionBar=getActionBar();
使用android:logo属性。不像方方正正的icon,logo的图像不会有任何宽度限制
当你有Logo的时候,你可以隐藏label。隐藏Label标签:
actionBar.setDisplayShowTitleEnabled(false);
隐藏logo和icon:
actionBar.setDisplayShowHomeEnabled(false);
默认情况下,actionBar放在你的activity的顶部,且作为activity布局的一部分。设置成为覆盖模式后,actionBar相当于漂浮在activity之上,不干预activity的布局。
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY); setContentView(R.layout.main);}
参考:
http://stackoverflow.com/questions/6735649/android-icon-vs-logo
http://tieba.baidu.com/p/3516704970
http://blog.csdn.net/jdsjlzx/article/details/41353029
- Android icon vs logo
- Android icon vs logo
- android:icon VS android:logo
- Android中icon和logo的区别
- Android中icon与logo的区别
- actionbar hide icon/logo 去掉android actionbar左侧图标
- Android vs iPhone icon设计指南
- Android VS 苹果 logo背后的故事
- Android vs iPhone icon设计指南(翻译理论)
- 【Android 应用开发】 ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式...
- Android Studio编译错误:Attribute application@icon value=(@drawable/logo) from AndroidManifest.xml:26:9
- VS+Qt 应用程序ICON
- iOS 动态更改APP(logo) icon
- Android:logo
- 【Android 应用开发】 ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
- Inline SVG vs Icon Fonts
- 给网页添加网站的logo(icon图标)
- 解决Toolbar的Icon、logo、title间距问题
- 定义一个复数类Complex 重载运算符 第二题
- MYSQL中利用select查询某字段中包含以逗号分隔的字符串的记录方法
- kyeremal-poj2311-Cutting Game-sg函数
- UVa 11149 - Power of Matrix
- IoC vs DI
- Android icon vs logo
- 定义一个复数类Coplex 使之能用于复数的加法运算 第三题
- Python进阶(一)——安装Python、程序执行、Python模块和IDLE调试
- IEEE指南:开发系统需求规格
- [leetCode] Rotate Image
- Emacs24配置文件
- 有两个矩阵a和b 均为2行3列 求两个矩阵之和第四题
- Linux tcpdump命令详解
- android 内存使用总结