Android编程之MaterialDesignLibrary:颇受开发者瞩目的一个控件效果库
白羽 2018-07-24 来源 :网络 阅读 1926 评论 0

摘要:本文将带你了解Android编程之MaterialDesignLibrary:颇受开发者瞩目的一个控件效果库,希望本文对大家学Android有所帮助



MaterialDesignLibrary可以说是颇受开发者瞩目的一个控件效果库,能够让开发者在Android 2.2系统上使用Android 5.0才支持的控件效果,比如扁平、矩形、浮动按钮,复选框以及各式各样的进度指示器等。
除上述之外,MaterialDesignLibrary还拥有SnackBar、Dialog、Color selector组件,可非常便捷地对应用界面进行设置。


Components

Buttons

Flat Button
Rectangle Button
Float Button
Float small button


Switches

CheckBox
Switch


Progress indicators

Progress bar circular indeterminate
Progress bar indeterminate
Progress bar indeterminate determinate
Progress bar determinate
Slider
Slider with number indicator




Widgets

SnackBar
Dialog
Color selector



怎么使用
如果你想使用这个库,你只要下载MaterialDesign项目,导入到你的workspace中,然后添加依赖就可以了
下面是使用例子



  
  
   
   Java
   
   <RelativeLayout xmlns:android="//schemas.android.com/apk/res/android"
    xmlns:materialdesign="//schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
</RelativeLayout>

如果你要使用了一个ScrollView, 推荐使用这个库中提供的 CustomScrollView
   
    
     
    
     12345678
    
      <RelativeLayout xmlns:android="//schemas.android.com/apk/res/android"    xmlns:materialdesign="//schemas.android.com/apk/res-auto"    android:layout_width="match_parent"    android:layout_height="match_parent"    ></RelativeLayout> 如果你要使用了一个ScrollView, 推荐使用这个库中提供的 CustomScrollView
     
    
   
  




  
  
   
   Java
   
   <com.gc.materialdesign.views.ScrollView 
   xmlns:android="//schemas.android.com/apk/res/android"
   xmlns:materialdesign="//schemas.android.com/apk/res-auto"
   android:id="@+id/scroll"
   android:layout_width="match_parent"
   android:layout_height="match_parent">
</com.gc.materialdesign.views.ScrollView>
   
    
     
    
     1234567
    
      <com.gc.materialdesign.views.ScrollView    xmlns:android="//schemas.android.com/apk/res/android"   xmlns:materialdesign="//schemas.android.com/apk/res-auto"   android:id="@+id/scroll"   android:layout_width="match_parent"   android:layout_height="match_parent"></com.gc.materialdesign.views.ScrollView>
     
    
   
  



开源地址:https://github.com/navasmdc/MaterialDesignLibrary    

本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标移动开发之Android频道!

本文由 @白羽 发布于职坐标。未经许可,禁止转载。
喜欢 | 0 不喜欢 | 0
看完这篇文章有何感觉?已经有0人表态,0%的人喜欢 快给朋友分享吧~
评论(0)
后参与评论

您输入的评论内容中包含违禁敏感词

我知道了

助您圆梦职场 匹配合适岗位
验证码手机号,获得海同独家IT培训资料
选择就业方向:
人工智能物联网
大数据开发/分析
人工智能Python
Java全栈开发
WEB前端+H5

请输入正确的手机号码

请输入正确的验证码

获取验证码

您今天的短信下发次数太多了,明天再试试吧!

提交

我们会在第一时间安排职业规划师联系您!

您也可以联系我们的职业规划师咨询:

小职老师的微信号:z_zhizuobiao
小职老师的微信号:z_zhizuobiao

版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
 沪公网安备 31011502005948号    

©2015 www.zhizuobiao.com All Rights Reserved