-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
Copy pathparams.json
6 lines (6 loc) · 10.7 KB
/
params.json
1
2
3
4
5
6
{
"name": "Materialdesignlibrary",
"tagline": "This is a library with components of Android L to you use in android 2.2",
"body": "\r\n\r\n# Material Design Android Library\r\n\r\n<a href=\"https://play.google.com/store/apps/details?id=com.gc.demomaterialdesign\">\r\n <img alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" />\r\n</a>\r\n\r\n\r\n[](https://android-arsenal.com/details/1/1156)\r\n\r\n* [How to use](#howtouse)\r\n* [Components](#components)\r\n * [Buttons](#buttons)\r\n * [Flat Button](#flat-button)\r\n * [Rectangle Button](#rectangle-button)\r\n * [Float Button](#float-button)\r\n * [Float small button](#float-small-button)\r\n * [Switches](#switches)\r\n * [CheckBox](#checkbox)\r\n * [Switch](#switch)\r\n * [Progress indicators](#progress-indicators)\r\n * [Progress bar circular indeterminate](#progress-bar-circula-rindeterminate)\r\n * [Progress bar indeterminate](#progress-bar-indeterminate)\r\n * [Progress bar indeterminate determinate](#progress-bar-indeterminate-determinate)\r\n * [Progress bar determinate](#progress-bar-determinate)\r\n * [Slider](#slider)\r\n * [Slider with number indicator](#slider-with-number-indicator)\r\n* [Widgets](#widgets)\r\n * [SnackBar](#snackbar)\r\n * [Dialog](#dialog)\r\n * [Color selector](#color-selector)\r\n\r\n## How to use\r\n\r\nIf 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.\r\n\r\nIf you prefer it, you can use the gradle dependency, you have to add these lines in your build.gradle file:\r\n\r\n```xml\r\nrepositories {\r\n jcenter()\r\n}\r\n\r\ndependencies {\r\n compile 'com.github.navasmdc:MaterialDesign:1.5@aar'\r\n}\r\n```\r\n\r\nSome components have custom attributes, if you want use them, you must add this line in your xml file in the first component:\r\n\r\n```xml\r\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n xmlns:materialdesign=\"http://schemas.android.com/apk/res-auto\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"match_parent\"\r\n >\r\n</RelativeLayout>\r\n```\r\n\r\n>If you are going to use a ScrollView, it is recommended that you use the CustomScrollView provided in this library to avoid problems with the custom components.\r\n>To use this component:\r\n>```xml\r\n><com.gc.materialdesign.views.ScrollView \r\n> xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n> xmlns:materialdesign=\"http://schemas.android.com/apk/res-auto\"\r\n> android:id=\"@+id/scroll\"\r\n> android:layout_width=\"match_parent\"\r\n> android:layout_height=\"match_parent\">\r\n></com.gc.materialdesign.views.ScrollView>\r\n>```\r\n\r\n##Components\r\n\r\n####Buttons\r\n\r\n######Flat Button\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.ButtonFlat\r\n android:id=\"@+id/buttonflat\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\"\r\n android:text=\"Button\" />\r\n```\r\n\r\n######Rectangle Button\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.ButtonRectangle\r\n android:id=\"@+id/button\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\"\r\n android:text=\"Button\" />\r\n```\r\n\r\n######Float Button\r\n\r\n\r\n\r\n>It is recommended to put this component in the right-bottom of the screen. To use this component write this code in your xml file.\r\n>If you don`t want to start this component with animation set the animate attribute to false.\r\n>Put your icon in the icon attribute to set the drawable icon for this component.\r\n\r\n```xml\r\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n xmlns:materialdesign=\"http://schemas.android.com/apk/res-auto\"\r\n android:layout_width=\"match_parent\"\r\n android:layout_height=\"match_parent\"\r\n >\r\n <!-- ... XML CODE -->\r\n <com.gc.materialdesign.views.ButtonFloat\r\n android:id=\"@+id/buttonFloat\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:layout_alignParentRight=\"true\"\r\n android:layout_alignParentBottom=\"true\"\r\n android:layout_marginRight=\"24dp\"\r\n android:background=\"#1E88E5\"\r\n materialdesign:animate=\"true\"\r\n materialdesign:iconDrawable=\"@drawable/ic_action_new\" />\r\n</RelativeLayout>\r\n```\r\n\r\n######Float small button\r\n\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.ButtonFloatSmall\r\n android:id=\"@+id/buttonFloatSmall\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\"\r\n materialdesign:iconDrawable=\"@drawable/ic_action_new\" />\r\n```\r\n\r\n####Switches\r\n\r\n######CheckBox\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.CheckBox\r\n android:id=\"@+id/checkBox\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\"\r\n materialdesign:check=\"true\" />\r\n```\r\n\r\n######Switch\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.Switch\r\n android:id=\"@+id/switchView\"\r\n android:layout_width=\"wrap_content\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\"\r\n materialdesign:check=\"true\" />\r\n```\r\n\r\n####Progress indicators\r\n\r\n######Progress bar circular indeterminate\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.ProgressBarCircularIndeterminate\r\n android:id=\"@+id/progressBarCircularIndeterminate\"\r\n android:layout_width=\"32dp\"\r\n android:layout_height=\"32dp\"\r\n android:background=\"#1E88E5\" />\r\n```\r\n\r\n######Progress bar indeterminate\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.ProgressBarIndeterminate\r\n android:id=\"@+id/progressBarIndeterminate\"\r\n android:layout_width=\"fill_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\" />\r\n```\r\n\r\n######Progress bar indeterminate determinate\r\n\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.ProgressBarIndeterminateDeterminate\r\n android:id=\"@+id/progressBarIndeterminateDeterminate\"\r\n android:layout_width=\"fill_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\" />\r\n```\r\n\r\n>If you begin progrees, you only have to set progress it\r\n>\r\n>```java\r\n>progressBarIndeterminateDeterminate.setProgress(progress);\r\n>```\r\n\r\n######Progress bar determinate\r\n\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.ProgressBarDeterminate\r\n android:id=\"@+id/progressDeterminate\"\r\n android:layout_width=\"fill_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\" />\r\n```\r\n\r\n>You can custom max and min progress values with `materialdesign:max=\"50\"` and `materialdesign:min=\"25\"` attributes.\r\n\r\n######Slider\r\n\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.Slider\r\n android:id=\"@+id/slider\"\r\n android:layout_width=\"fill_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\"\r\n materialdesign:max=\"50\"\r\n materialdesign:min=\"0\"\r\n />\r\n```\r\n\r\n######Slider with number indicator\r\n\r\n\r\n\r\n```xml\r\n<com.gc.materialdesign.views.Slider\r\n android:id=\"@+id/slider\"\r\n android:layout_width=\"fill_parent\"\r\n android:layout_height=\"wrap_content\"\r\n android:background=\"#1E88E5\"\r\n materialdesign:max=\"50\"\r\n materialdesign:min=\"0\"\r\n materialdesign:showNumberIndicator=\"true\"/>\r\n```\r\n\r\n##Widgets\r\n\r\n####SnackBar\r\n\r\n\r\n\r\n\r\n```java\r\nSnackBar snackbar = new SnackBar(Activity activity, String text, String buttonText, View.OnClickListener onClickListener);\r\nsnackbar.show();\r\n```\r\n\r\n> If you don't want to show the button, put `null` in `buttonText` attribute\r\n\r\n####Dialog\r\n\r\n\r\n\r\n```java\r\nDialog dialog = new Dialog(Context context,String title, String message);\r\ndialog.show();\r\n```\r\n\r\n>You can set the accept and cancel button on the event listener or change it's text\r\n>```java\r\n> // Set accept click listenner\r\n>dialog.setOnAcceptButtonClickListener(View.OnClickListener onAcceptButtonClickListener);\r\n> // Set cancel click listenner\r\n>dialog.setOnCancelButtonClickListener(View.OnClickListener onCancelButtonClickListener);\r\n> // Acces to accept button\r\n>ButtonFlat acceptButton = dialog.getButtonAccept();\r\n> // Acces to cancel button\r\n>ButtonFlat cancelButton = dialog.getButtonCancel();\r\n>```\r\n\r\n####Color selector\r\n\r\n\r\n\r\n```java\r\nColorSelector colorSelector = new ColorSelector(Context context,int intialColor, OnColorSelectedListener onColorSelectedListener);\r\ncolorSelector.show();\r\n```\r\n\r\n\r\n\r\n\r\n\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}