瀏覽代碼

Add ARGB feature of color chooser to the README

Aidan Follestad 6 年之前
父節點
當前提交
4a091826d7
共有 2 個文件被更改,包括 21 次插入0 次删除
  1. 21 0
      README.md
  2. 二進制
      art/custom_argb.png

+ 21 - 0
README.md

@@ -1116,3 +1116,24 @@ MaterialDialog(this)
   .positiveButton(R.string.select)
   .show()
 ```
+
+### ARGB Selection
+
+<img src="https://raw.githubusercontent.com/afollestad/material-dialogs/master/art/custom_argb.png" width="200px" />
+
+```kotlin
+MaterialDialog(this)
+  .title(R.string.colors)
+  .colorChooser(
+      colors = colors, 
+      subColors = subColors,
+      allowCustomArgb = true,
+      showAlphaSelector = true
+  ) { dialog, color ->
+      // Use color integer
+  }
+  .positiveButton(R.string.select)
+  .show()
+```
+
+Omitting `showAlphaSelector` will hide the alpha (transparency) selector.

二進制
art/custom_argb.png