首页 > 移动平台 > 详细

a few changes of Android 5.0

时间:2015-06-27 19:48:42      阅读:241      评论:0      收藏:0      [点我收藏+]

1.Service Intent must be explicit

Intent serviceIntent = new Intent(context,MyService.class);
context.startService(serviceIntent);
Note:Implicit intents with startService are not safe

2.Button Text is always Uppercase

<style name="TextAppearance.Material.Button">
<item name="textSize">@dimen/text_size_button_material</item>
<item name="fontFamily">@string/font_family_button_material</item>
<item name="textAllCaps">true</item>
<item name="textColor">?attr/textColorPrimary</item>
</style>

Using <item name="android:textAllCaps">false</item>

3.Material Design Action Bar 默认是有shadow的,是因为新的elevation API,

action bar style 的xml中,定义elevation 属性为0

or getActionBar().setElevation(0)

a few changes of Android 5.0

原文:http://www.cnblogs.com/ZacharyHodgeZou/p/4604434.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!