Android的设计素材UI库(包括按钮,开关,进度条,滑块,对话,

时间:2016-08-18 16:58 来源:互联网 作者:源码搜藏收藏

  • 源码类别:按钮表单
  • 源码大小:未知
  • 编码格式:gbk,utf8,不限
  • 运行环境:php+mysql
  • 广告推荐

如何使用

如果你想使用这个库,你只需要下载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 = 

本站资源仅限于学习研究,严禁从事商业或者非法活动! 源码搜藏网所有源码来自互联网转载与用户上传分享,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!

按钮表单下载排行

最新文章