Parcourir la source

Remove fab actions shadow on pre lollipop devices

This is a temporary solution to #292
Guy Carmeli il y a 8 ans
Parent
révision
e997f22c66

+ 2
- 2
android/app/build.gradle Voir le fichier

@@ -58,8 +58,8 @@ allprojects { p ->
58 58
 dependencies {
59 59
     compile fileTree(dir: "libs", include: ["*.jar"])
60 60
     compile "com.aurelhubert:ahbottomnavigation:1.3.3"
61
-    compile "com.android.support:appcompat-v7:23.0.1"
62
-    compile 'com.android.support:design:23.1.1'
61
+    compile "com.android.support:appcompat-v7:23.3.0"
62
+    compile 'com.android.support:design:23.3.0'
63 63
     compile "com.facebook.react:react-native:+"  // From node_modules
64 64
     compile 'com.balysv.materialmenu:material-menu-toolbar:1.5.4'
65 65
 

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/views/FloatingActionButtonCoordinator.java Voir le fichier

@@ -4,6 +4,7 @@ import android.animation.Animator;
4 4
 import android.animation.AnimatorListenerAdapter;
5 5
 import android.content.res.ColorStateList;
6 6
 import android.graphics.drawable.Drawable;
7
+import android.os.Build;
7 8
 import android.support.annotation.FloatRange;
8 9
 import android.support.annotation.NonNull;
9 10
 import android.support.annotation.Nullable;
@@ -160,6 +161,9 @@ public class FloatingActionButtonCoordinator {
160 161
             action.setBackgroundTintList(ColorStateList.valueOf(actionParams.backgroundColor.getColor()));
161 162
         }
162 163
         action.setSize(FloatingActionButton.SIZE_MINI);
164
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
165
+            action.setCompatElevation(0);
166
+        }
163 167
         return action;
164 168
     }
165 169