一、Material Design主题

android:style/Theme.Material
android:style/Theme.Materail.Light
android:style/Theme.Materail.Light.DarkActionBar

二、Material Design兼容主题

Theme.AppCompat.Light
Theme.AppCompat.Light.DarkActionBar

三、Material Design主题常用属性

colorPrimary:主题颜色
colorPrimaryDark:状态栏颜色
colorAccent:增强色颜色,比如我们平时在使用CheckBox,SwitchButton的时候默认会有一个颜色。
textColorPrimary:主题字体颜色
windowBackground:窗体背景色
navigationBarColor:导航栏颜色

itemBackground:设置menu菜单的背景色
overlapAnchor:设置Menu窗口不覆盖ToolBar视图

四、Material Design交互

常用控件
ToolBar
DrawerLayout
NavigationView
BottomNavigationView
FloatingActionButton
SnackBar


CardView
CoordinatorLayout
AppBarLayout
CollapsingToolbarLayout
NestedScrollView

常用动画
Fade淡入
Slide滑动
Explode分解
共享元素

五、使用

使用示例:

  • DrawLayout,ToolBar,NavigationView

  • BottomNavigationView,FloatingActionButton,SnackBar

  • Material Design的综合使用,我们时常看到的酷炫的效果

  • RecyclerView的顶部悬停,自定义Behavior

代码都放在github上了,太多了,懒得粘在文章中。

github示例地址

Material Design控件使用

更多相关文章

  1. Android(安卓)gradle测试
  2. android 中 checkBox 的使用
  3. Android(安卓)Location 和 Sensor的使用,图片旋转角度
  4. 使用FragmentTabHost时,tabwidget被frament覆盖。
  5. Android:霓虹灯
  6. 修改进度条ProgressBar颜色
  7. Android颜色渐变的分隔线(ListView)
  8. android -- 框架 使用android快速开发框架afinal的FinalBitmap
  9. Android使用了ProGuard时注意的事项

随机推荐

  1. 没学历,写简历这几个细节很重要!
  2. 动画:面试如何轻松反转链表?
  3. 给实习期画上一个圆满的句号。
  4. 扫盲: Webpack 从扫盲到手撸(上)
  5. 换个地方工作就会变好吗?
  6. 动画:扫盲 Git 版本控制(下)
  7. 这次鹿哥的福利不会让你们失望!
  8. 谈一谈我扎心的求学经历!
  9. GitHub的注册,代码仓库的创建,用小乌龟上传
  10. 老前辈和我讲述了前后端十几年的发展历程