-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path笔记
32 lines (23 loc) · 1.18 KB
/
笔记
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-------------------主题--------------------------
1.状态栏颜色可以在主题设置,如
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <!-- ToolBar -->
<item name="colorPrimaryDark">#007FFF</item> <!-- 状态栏 -->
</style>
2.隐藏ToolBar
在Activity初始化时 getSupportActionBar().hide();
<!--Android 5.x开始需要把颜色设置透明,否则导航栏会呈现系统默认的浅灰色-->
<item name="android:statusBarColor">@android:color/transparent</item>
3.根据需求改变,可以参考网站
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/1118/2006.html
4.查看gralle错误信息
gradlewcompileDebug --stacktrace -info
原文:https://blog.csdn.net/mp624183768/article/details/56667764
ldpi 320*240 1dp=0.75px
mdpi 480*320 1dp=1.0px
hdpi 800*480 1dp=1.5px
xhdpi 1280*720 1dp=2.0px
xxhdpi 1920*1080 1dp=3px
view还没显示在屏幕的时候,fragmentManagement.add(fragment,R.id.view),是会找不到view的