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,7 +23,7 @@ import java.util.ArrayList;
23 23
 
24 24
 import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
25 25
 
26
-public class FloatingActionButtonCoordinator {
26
+class FloatingActionButtonCoordinator {
27 27
     private static final String TAG = "FloatingActionButtonCoo";
28 28
     private static final int INITIAL_EXPENDED_FAB_ROTATION = -90;
29 29
     private CoordinatorLayout parent;
@@ -32,8 +32,8 @@ public class FloatingActionButtonCoordinator {
32 32
     private FloatingActionButton expendedFab;
33 33
     private final int crossFadeAnimationDuration;
34 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 37
     private final ArrayList<FloatingActionButton> actions;
38 38
 
39 39
     FloatingActionButtonCoordinator(CoordinatorLayout parent) {
@@ -197,12 +197,12 @@ public class FloatingActionButtonCoordinator {
197 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 201
         private final int MAX_VALUE = 90;
202 202
         private int dependencyId;
203 203
         private float yStep;
204 204
 
205
-        public ActionBehaviour(View anchor, float yStep) {
205
+        ActionBehaviour(View anchor, float yStep) {
206 206
             this.yStep = yStep;
207 207
             this.dependencyId = anchor.getId();
208 208
         }

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

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