其他分享
首页 > 其他分享> > a few changes of Android 5.0

a few changes of Android 5.0

作者:互联网

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

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)

转载于:https://www.cnblogs.com/ZacharyHodgeZou/p/4604434.html

标签:5.0,www,elevation,serviceIntent,ZacharyHodgeZou,few,html,Intent,Android
来源: https://blog.csdn.net/weixin_30614109/article/details/96762504