Added backgroundColor (#113)

This commit is contained in:
Wojciech Gruszka 2019-09-27 10:54:41 +02:00 committed by Vojtech Novak
parent 33453615d3
commit d5b3731125
3 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@ type OptionsCommon = {|
positiveColor?: ColorValue,
negativeColor?: ColorValue,
neutralColor?: ColorValue,
backgroundColor?: ColorValue,
cancelable?: boolean,
linkColor?: ColorValue, // applies if contentIsHtml is true, and there are <a> elements in content string
forceStacking?: boolean,

View File

@ -348,6 +348,7 @@ Shows a progress dialog. By default no buttons are shown, and hardware back butt
> neutralText?: string,
> positiveColor?: ColorValue,
> positiveText?: string, // default "OK"
> backgroundColor?: ColorValue,
> title?: string,
> titleColor?: ColorValue,
> }
@ -368,6 +369,7 @@ Shows a progress dialog. By default no buttons are shown, and hardware back butt
| neutralText | `string` | | | Shows button in far left with this string as label. If falsy, button is not shown. |
| positiveColor | [`ColorValue`](https://facebook.github.io/react-native/docs/colors.html) | | | |
| positiveText | `string` | | | If falsy, button is not shown. |
| backgroundColor | [`ColorValue`](https://facebook.github.io/react-native/docs/colors.html) | | | |
| title | `string` | | | Title of dialog |
| titleColor | [`ColorValue`](https://facebook.github.io/react-native/docs/colors.html) | | | Color of title |

View File

@ -96,6 +96,9 @@ public class DialogAndroid extends ReactContextBaseJavaModule {
case "contentColor":
builder.contentColor(options.getInt("contentColor"));
break;
case "backgroundColor":
builder.backgroundColor(options.getInt("backgroundColor"));
break;
case "items":
ReadableArray arr = options.getArray("items");
String[] items = new String[arr.size()];