Browse Source

Fix TopTabs selected and unselected colors

Guy Carmeli 6 years ago
parent
commit
093347c04b

+ 2
- 3
lib/android/app/src/main/java/com/reactnativenavigation/views/toptabs/TopTabsStyleHelper.java View File

@@ -9,7 +9,6 @@ import com.reactnativenavigation.parse.params.Color;
9 9
 import com.reactnativenavigation.parse.params.Number;
10 10
 import com.reactnativenavigation.utils.Task;
11 11
 import com.reactnativenavigation.utils.ViewUtils;
12
-import com.reactnativenavigation.views.toptabs.TopTabs;
13 12
 
14 13
 class TopTabsStyleHelper {
15 14
     private TopTabs topTabs;
@@ -31,11 +30,11 @@ class TopTabsStyleHelper {
31 30
         int tabTextColor = originalColors != null ? originalColors.getColorForState(topTabs.getDefaultTabColors(), -1) : -1;
32 31
 
33 32
         if (selected.hasValue()) {
34
-            tabTextColor = selected.get();
33
+            selectedTabColor = selected.get();
35 34
         }
36 35
 
37 36
         if (unselected.hasValue()) {
38
-            selectedTabColor = unselected.get();
37
+            tabTextColor = unselected.get();
39 38
         }
40 39
 
41 40
         topTabs.setTabTextColors(tabTextColor, selectedTabColor);