在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):navasmdc/MaterialDesignLibrary开源软件地址(OpenSource Url):https://github.com/navasmdc/MaterialDesignLibrary开源编程语言(OpenSource Language):Java 67.1%开源软件介绍(OpenSource Introduction):Material Design Android LibraryHow to useIf you want use this library, you only have to download MaterialDesign project, import it into your workspace and add the project as a library in your android project settings. If you prefer it, you can use the gradle dependency, you have to add these lines in your build.gradle file: repositories {
jcenter()
}
dependencies {
compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
} Some components have custom attributes, if you want use them, you must add this line in your xml file in the first component: <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>
##Components ####Buttons ######Flat Button <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" /> ######Rectangle 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" /> ######Float Button
<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 CODE -->
<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> ######Float small button <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" /> ####Switches <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" /> ####Progress indicators ######Progress bar circular indeterminate <com.gc.materialdesign.views.ProgressBarCircularIndeterminate
android:id="@+id/progressBarCircularIndeterminate"
android:layout_width="32dp"
android:layout_height="32dp"
android:background="#1E88E5" /> ######Progress bar indeterminate <com.gc.materialdesign.views.ProgressBarIndeterminate
android:id="@+id/progressBarIndeterminate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#1E88E5" /> ######Progress bar indeterminate determinate <com.gc.materialdesign.views.ProgressBarIndeterminateDeterminate
android:id="@+id/progressBarIndeterminateDeterminate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#1E88E5" />
######Progress bar determinate <com.gc.materialdesign.views.ProgressBarDeterminate
android:id="@+id/progressDeterminate"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#1E88E5" />
<com.gc.materialdesign.views.Slider
android:id="@+id/slider"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#1E88E5"
materialdesign:max="50"
materialdesign:min="0"
/> ######Slider with number indicator <com.gc.materialdesign.views.Slider
android:id="@+id/slider"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#1E88E5"
materialdesign:max="50"
materialdesign:min="0"
materialdesign:showNumberIndicator="true"/> ##Widgets ####SnackBar SnackBar snackbar = new SnackBar(Activity activity, String text, String buttonText, View.OnClickListener onClickListener);
snackbar.show();
####Dialog Dialog dialog = new Dialog(Context context,String title, String message);
dialog.show();
####Color selector ColorSelector colorSelector = new ColorSelector(Context context,int intialColor, OnColorSelectedListener onColorSelectedListener);
colorSelector.show(); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论