|
@@ -6,6 +6,7 @@ import android.support.annotation.IntRange;
|
6
|
6
|
import android.view.View;
|
7
|
7
|
|
8
|
8
|
import com.aurelhubert.ahbottomnavigation.AHBottomNavigation;
|
|
9
|
+import com.reactnativenavigation.BuildConfig;
|
9
|
10
|
import com.reactnativenavigation.parse.params.Text;
|
10
|
11
|
import com.reactnativenavigation.utils.CompatUtils;
|
11
|
12
|
|
|
@@ -18,10 +19,10 @@ public class BottomTabs extends AHBottomNavigation {
|
18
|
19
|
}
|
19
|
20
|
|
20
|
21
|
public void setTabTag(int index, Text testId) {
|
|
22
|
+ if (!testId.hasValue()) return;
|
21
|
23
|
View view = getViewAtPosition(index);
|
22
|
|
- if (!testId.hasValue() || view == null) return;
|
23
|
24
|
view.setTag(testId.get());
|
24
|
|
- view.setContentDescription(testId.get());
|
|
25
|
+ if (BuildConfig.DEBUG) view.setContentDescription(testId.get());
|
25
|
26
|
}
|
26
|
27
|
|
27
|
28
|
public void setBadge(int bottomTabIndex, Text badge) {
|
|
@@ -32,4 +33,14 @@ public class BottomTabs extends AHBottomNavigation {
|
32
|
33
|
public void setCurrentItem(@IntRange(from = 0) int position) {
|
33
|
34
|
super.setCurrentItem(position);
|
34
|
35
|
}
|
|
36
|
+
|
|
37
|
+ @Override
|
|
38
|
+ public void setAccentColor(int accentColor) {
|
|
39
|
+ if (getAccentColor() != accentColor) super.setAccentColor(accentColor);
|
|
40
|
+ }
|
|
41
|
+
|
|
42
|
+ @Override
|
|
43
|
+ public void setInactiveColor(int inactiveColor) {
|
|
44
|
+ if (getInactiveColor() != inactiveColor) super.setInactiveColor(inactiveColor);
|
|
45
|
+ }
|
35
|
46
|
}
|