Add widgetColor, titleColor, contentColor and linkColor options (#72)
* add widgetColor option * update readme * update more color options * call correct functions * update readme * cleanup
This commit is contained in:
parent
c6f14380c5
commit
c6ffde7a60
|
@ -102,7 +102,9 @@ This library is a thin wrapper over [afollestad/material-dialogs](https://github
|
|||
|
||||
The following options are currently supported (value type is `String` unless mentioned otherwise) :
|
||||
* [`title`](https://github.com/afollestad/material-dialogs#basic-dialog)
|
||||
* [`titleColor`](https://github.com/afollestad/material-dialogs#colors)
|
||||
* [`content`](https://github.com/afollestad/material-dialogs#basic-dialog)
|
||||
* [`contentColor`](https://github.com/afollestad/material-dialogs#colors)
|
||||
* [`positiveText`](https://github.com/afollestad/material-dialogs#basic-dialog)
|
||||
* [`positiveColor`](https://github.com/afollestad/material-dialogs#basic-dialog)
|
||||
* [`onPositive`](https://github.com/afollestad/material-dialogs#callbacks) (function with no arguments)
|
||||
|
@ -119,6 +121,8 @@ The following options are currently supported (value type is `String` unless men
|
|||
* [`selectedIndex`](https://github.com/afollestad/material-dialogs#single-choice-list-dialogs) (int) - set the preselected index for Single Choice List
|
||||
* [`itemsCallbackMultiChoice`](https://github.com/afollestad/material-dialogs#multi-choice-list-dialogs) (function with 2 arguments : selected indices (array of ints) and selected items (array of strings)
|
||||
* [`selectedIndices`](https://github.com/afollestad/material-dialogs#multi-choice-list-dialogs) (array of ints) - set the preselected indices for Multiple Choice List
|
||||
* [`widgetColor`](https://github.com/afollestad/material-dialogs#coloring-radio-buttons) - set the color of Radio Buttons and EditText
|
||||
* [`linkColor`](https://github.com/afollestad/material-dialogs#colors)
|
||||
* `multiChoiceClearButton` (boolean) - provide a 'Clear' button in Multiple Choice List
|
||||
* `autoDismiss` (boolean)
|
||||
* [`forceStacking`](https://github.com/afollestad/material-dialogs#stacked-action-buttons) (boolean)
|
||||
|
|
|
@ -66,6 +66,18 @@ public class DialogAndroid extends ReactContextBaseJavaModule {
|
|||
case "neutralColor":
|
||||
builder.neutralColor(Color.parseColor(options.getString("neutralColor")));
|
||||
break;
|
||||
case "titleColor":
|
||||
builder.titleColor(Color.parseColor(options.getString("titleColor")));
|
||||
break;
|
||||
case "widgetColor":
|
||||
builder.widgetColor(Color.parseColor(options.getString("widgetColor")));
|
||||
break;
|
||||
case "linkColor":
|
||||
builder.linkColor(Color.parseColor(options.getString("linkColor")));
|
||||
break;
|
||||
case "contentColor":
|
||||
builder.contentColor(Color.parseColor(options.getString("contentColor")));
|
||||
break;
|
||||
case "items":
|
||||
ReadableArray arr = options.getArray("items");
|
||||
String[] items = new String[arr.size()];
|
||||
|
|
Loading…
Reference in New Issue