如果你想使用这个库,你只需要下载MaterialDesign项目,将其导入到你的工作空间,并添加项目在你的Android项目设置库。
如果你喜欢它,你可以使用gradle这个依赖,你已经在你的build.gradle文件中添加这些行:
repositories {
jcenter()
}
dependencies {
compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
}
某些组件具有自定义属性,如果你想使用它们,你必须在第一部分XML文件中加入这一行:
< RelativeLayout xmlns : android = " http://schemas.android.com/apk/res/android "
xmlns : materialdesign = " http://schemas.android.com/apk/res-auto "
android : layout_width = " match_parent "
android : layout_height = " match_parent "
>
</ RelativeLayout >
如果你要使用滚动型,建议您使用这个库中提供的CustomScrollView以避免与自定义组件的问题。要使用这个组件:
< com .gc.materialdesign.views.ScrollView xmlns : android = " http://schemas.android.com/apk/res/android " xmlns : materialdesign = " http://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>

< com .gc.materialdesign.views.ButtonFlat
android : id = " @+id/buttonflat "
android : layout_width = " wrap_content "
android : layout_height = " wrap_content "
android : background = " #1E88E5 "
android : text = " Button " />

< com .gc.materialdesign.views.ButtonRectangle
android : id = " @+id/button "
android : layout_width = " wrap_content "
android : layout_height = " wrap_content "
android : background = " #1E88E5 "
android : text = " Button " />

建议把这个组件在屏幕的右下角。要在XML文件中使用这个组件编写代码。如果我想知道我开始这个组件动画的动画属性设置为false。把你的图标,在图标属性来设置此组件的绘制图标。
< RelativeLayout xmlns : android = " http://schemas.android.com/apk/res/android "
xmlns : materialdesign = " http://schemas.android.com/apk/res-auto "
android : layout_width = " match_parent "
android : layout_height = " match_parent "
> <!-- ... XML代码-->
< com .gc.materialdesign.views.ButtonFloat
android : id = " @+id/buttonFloat " android : layout_width = " wrap_content " android : layout_height = " wrap_content " android : layout_alignParentRight = " true " android : layout_alignParentBottom = " true " android : layout_marginRight = " 24dp " android : background = " #1E88E5 " materialdesign : animate = " true " materialdesign : iconDrawable = " @drawable/ic_action_new " />
</ RelativeLayout >

< com .gc.materialdesign.views.ButtonFloatSmall
android : id = " @+id/buttonFloatSmall "
android : layout_width = " wrap_content "
android : layout_height = " wrap_content "
android : background = " #1E88E5 "
materialdesign : iconDrawable = " @drawable/ic_action_new " />

< com .gc.materialdesign.views.CheckBox
android : id = " @+id/checkBox "
android : layout_width = " wrap_content "
android : layout_height = " wrap_content "
android : background = " #1E88E5 "
materialdesign : check = " true " />

< com .gc.materialdesign.views.Switch
android : id = " @+id/switchView "
android : layout_width = " wrap_content "
android : layout_height = " wrap_content "
android : background = " #1E88E5 "
materialdesign : check = " true " />

< com .gc.materialdesign.views.ProgressBarCircularIndeterminate
android : id = " @+id/progressBarCircularIndeterminate "
android : layout_width = " 32dp "
android : layout_height =
Android用来处理界面上的表单验证源码
Android带阴影点击效果,可自定义属性的媒体播放控制按钮。包括
Android实现带3D视差效果的多选按钮
仿饿了么加入购物车旋转控件 - 自带闪转腾挪动画 的按钮
Android 表单验证 AValidations
从即将推出的Android L.新的抽屉指示器/后退箭头旋转绘制一个简
Android的设计素材UI库(包括按钮,开关,进度条,滑块,对话,
简单将RadioButton封装了一下Android 按钮组
分享自己写的两个比较好看的togglebutton
自定义支持圆角Button按钮
登录加载、返回按钮转场动画控件
Android 下高仿 iOS 的增强版滑动开关组件,含实现原理EasySwitc
Android用来处理界面上的表单验证源码
Android带阴影点击效果,可自定义属性的媒体播放控制按钮。包括
Android实现带3D视差效果的多选按钮
Android 表单验证 AValidations
从即将推出的Android L.新的抽屉指示器/后退箭头旋转绘制一个简
简单将RadioButton封装了一下Android 按钮组
热门源码