Bladeren bron

Add ARGB feature of color chooser to the README

Aidan Follestad 6 jaren geleden
bovenliggende
commit
4a091826d7
2 gewijzigde bestanden met toevoegingen van 21 en 0 verwijderingen
  1. 21 0
      README.md
  2. BIN
      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.

BIN
art/custom_argb.png