Browse Source

Fix missing background color for fab actions

Guy Carmeli 7 years ago
parent
commit
de5e45c903

+ 5
- 5
android/app/src/main/java/com/reactnativenavigation/views/FloatingActionButtonCoordinator.java View File

23
 
23
 
24
 import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
24
 import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
25
 
25
 
26
-public class FloatingActionButtonCoordinator {
26
+class FloatingActionButtonCoordinator {
27
     private static final String TAG = "FloatingActionButtonCoo";
27
     private static final String TAG = "FloatingActionButtonCoo";
28
     private static final int INITIAL_EXPENDED_FAB_ROTATION = -90;
28
     private static final int INITIAL_EXPENDED_FAB_ROTATION = -90;
29
     private CoordinatorLayout parent;
29
     private CoordinatorLayout parent;
32
     private FloatingActionButton expendedFab;
32
     private FloatingActionButton expendedFab;
33
     private final int crossFadeAnimationDuration;
33
     private final int crossFadeAnimationDuration;
34
     private final int actionSize;
34
     private final int actionSize;
35
-    final int margin = (int) ViewUtils.convertDpToPixel(16);
36
-    FloatingActionButtonAnimator fabAnimator;
35
+    private final int margin = (int) ViewUtils.convertDpToPixel(16);
36
+    private FloatingActionButtonAnimator fabAnimator;
37
     private final ArrayList<FloatingActionButton> actions;
37
     private final ArrayList<FloatingActionButton> actions;
38
 
38
 
39
     FloatingActionButtonCoordinator(CoordinatorLayout parent) {
39
     FloatingActionButtonCoordinator(CoordinatorLayout parent) {
197
         return lp;
197
         return lp;
198
     }
198
     }
199
 
199
 
200
-    public static class ActionBehaviour extends CoordinatorLayout.Behavior<FloatingActionButton> {
200
+    private static class ActionBehaviour extends CoordinatorLayout.Behavior<FloatingActionButton> {
201
         private final int MAX_VALUE = 90;
201
         private final int MAX_VALUE = 90;
202
         private int dependencyId;
202
         private int dependencyId;
203
         private float yStep;
203
         private float yStep;
204
 
204
 
205
-        public ActionBehaviour(View anchor, float yStep) {
205
+        ActionBehaviour(View anchor, float yStep) {
206
             this.yStep = yStep;
206
             this.yStep = yStep;
207
             this.dependencyId = anchor.getId();
207
             this.dependencyId = anchor.getId();
208
         }
208
         }

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

521
   if (fab.actions) {
521
   if (fab.actions) {
522
     _.forEach(fab.actions, (action) => {
522
     _.forEach(fab.actions, (action) => {
523
       action.icon = resolveAssetSource(action.icon).uri;
523
       action.icon = resolveAssetSource(action.icon).uri;
524
+      if (action.backgroundColor) {
525
+        action.backgroundColor = processColor(action.backgroundColor)
526
+      }
524
       return action;
527
       return action;
525
     });
528
     });
526
   }
529
   }