Browse Source

Moved change in button to JS

Yedidya Kennard 8 years ago
parent
commit
2330d0a340

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/params/parsers/TitleBarButtonParamsParser.java View File

27
         }
27
         }
28
         result.color = new StyleParams.Color(ColorParser.parse(bundle.getString("color")));
28
         result.color = new StyleParams.Color(ColorParser.parse(bundle.getString("color")));
29
         result.showAsAction = parseShowAsAction(bundle.getString("showAsAction"));
29
         result.showAsAction = parseShowAsAction(bundle.getString("showAsAction"));
30
-        result.enabled = !bundle.getBoolean("disabled", false);
30
+        result.enabled = bundle.getBoolean("enabled", true);
31
         result.eventId = bundle.getString("id");
31
         result.eventId = bundle.getString("id");
32
         return result;
32
         return result;
33
     }
33
     }

+ 1
- 0
src/deprecated/platformSpecificDeprecated.android.js View File

266
   const rightButtons = getRightButtons(screen);
266
   const rightButtons = getRightButtons(screen);
267
   if (rightButtons) {
267
   if (rightButtons) {
268
     rightButtons.forEach(function(button) {
268
     rightButtons.forEach(function(button) {
269
+      button.enabled = !button.disabled;
269
       if (button.icon) {
270
       if (button.icon) {
270
         const icon = resolveAssetSource(button.icon);
271
         const icon = resolveAssetSource(button.icon);
271
         if (icon) {
272
         if (icon) {