Daniel Zlotin 8 years ago
parent
commit
01ccc464d1

+ 3
- 3
android/app/src/main/java/com/reactnativenavigation/activities/BottomTabActivity.java View File

@@ -37,7 +37,7 @@ public class BottomTabActivity  {
37 37
 //        setupTabs(getIntent().getExtras());
38 38
 //        setupPages(screens);
39 39
 //
40
-//        // Setup Toolbar after it's measured since icon height is dependent on Toolbar height
40
+//        // Setup Toolbar after it's measured since tabIcon height is dependent on Toolbar height
41 41
 //        mContentFrame.post(new Runnable() {
42 42
 //            @Override
43 43
 //            public void run() {
@@ -239,7 +239,7 @@ public class BottomTabActivity  {
239 239
 //        protected Map<_Screen, Drawable> doInBackground(Void... params) {
240 240
 //            Map<_Screen, Drawable> icons = new HashMap<>();
241 241
 //            for (_Screen screen : mScreens) {
242
-//                if (screen.icon != null) {
242
+//                if (screen.tabIcon != null) {
243 243
 //                    icons.put(screen, screen.getIcon(this.mActivity));
244 244
 //                }
245 245
 //            }
@@ -271,7 +271,7 @@ public class BottomTabActivity  {
271 271
 //            ScreenStack stack = new ScreenStack(this);
272 272
 //            stack.push(screen);
273 273
 //            mScreenStacks.add(stack);
274
-//            AHBottomNavigationItem item = new AHBottomNavigationItem(screen.label, icons.get(screen), Color.GRAY);
274
+//            AHBottomNavigationItem item = new AHBottomNavigationItem(screen.tabLabel, icons.get(screen), Color.GRAY);
275 275
 //            mBottomNavigation.addItem(item);
276 276
 //            mBottomNavigation.setOnTabSelectedListener(this);
277 277
 //        }

+ 2
- 2
android/app/src/main/java/com/reactnativenavigation/activities/SingleScreenActivity.java View File

@@ -29,7 +29,7 @@ public class SingleScreenActivity {
29 29
 //        contentFrame.addView(mScreenStack);
30 30
 //        mScreenStack.push(screen);
31 31
 //
32
-//        // Setup Toolbar after it's measured since icon height is dependent on Toolbar height
32
+//        // Setup Toolbar after it's measured since tabIcon height is dependent on Toolbar height
33 33
 //        contentFrame.post(new Runnable() {
34 34
 //            @Override
35 35
 //            public void run() {
@@ -101,7 +101,7 @@ public class SingleScreenActivity {
101 101
 //    @Override
102 102
 //    public void showFAB(ReadableMap params) {
103 103
 ////        FloatingActionButton fab = new FloatingActionButton(this);
104
-////        fab.setImageDrawable(IconUtils.getIcon(this, params.getString("icon")));
104
+////        fab.setImageDrawable(IconUtils.getIcon(this, params.getString("tabIcon")));
105 105
 ////        fab.setBackgroundColor(Color.parseColor(params.getString("backgroundColor")));
106 106
 ////        fab.setImageResource(R.drawable.notification_background);
107 107
 ////        CoordinatorLayout content = (CoordinatorLayout) findViewById(R.id.contentFrame);

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/adapters/ViewPagerAdapter.java View File

@@ -74,7 +74,7 @@ public class ViewPagerAdapter {
74 74
 //
75 75
 //    @Override
76 76
 //    public CharSequence getPageTitle(int position) {
77
-//        return mScreenStacks.get(position).peek().label;
77
+//        return mScreenStacks.get(position).peek().tabLabel;
78 78
 //    }
79 79
 //
80 80
 //    @Override

+ 4
- 4
android/app/src/main/java/com/reactnativenavigation/bridge/parsers/ScreenParamsParser.java View File

@@ -7,11 +7,11 @@ import com.reactnativenavigation.controllers.ScreenParams;
7 7
 public class ScreenParamsParser implements ParamsParser<ScreenParams> {
8 8
     private static final String KEY_TITLE = "title";
9 9
     private static final String KEY_SCREEN = "screen";
10
-    private static final String KEY_LABEL = "label";
10
+    private static final String KEY_LABEL = "tabLabel";
11 11
     private static final String KEY_SCREEN_INSTANCE_ID = "screenInstanceID";
12 12
     private static final String KEY_NAVIGATOR_ID = "navigatorID";
13 13
     private static final String KEY_NAVIGATOR_EVENT_ID = "navigatorEventID";
14
-    private static final String KEY_ICON = "icon";
14
+    private static final String KEY_ICON = "tabIcon";
15 15
     private static final String KEY_NAVIGATOR_BUTTONS = "navigatorButtons";
16 16
     private static final String KEY_RIGHT_BUTTONS = "rightButtons";
17 17
     private static final String KEY_TOOL_BAR_STYLE = "navigatorStyle";
@@ -33,12 +33,12 @@ public class ScreenParamsParser implements ParamsParser<ScreenParams> {
33 33
     public ScreenParams parse(ReadableMap params) {
34 34
         ScreenParams result = new ScreenParams();
35 35
         result.title = params.getString(KEY_TITLE);
36
-        result.label = params.getString(KEY_LABEL);
36
+        result.tabLabel = params.getString(KEY_LABEL);
37 37
         result.screenId = params.getString(KEY_SCREEN);
38 38
         result.screenInstanceId = params.getString(KEY_SCREEN_INSTANCE_ID);
39 39
         result.navigatorId = params.getString(KEY_NAVIGATOR_ID);
40 40
         result.navigatorEventId = params.getString(KEY_NAVIGATOR_EVENT_ID);
41
-        result.icon = getString(KEY_ICON);
41
+        result.tabIcon = getString(KEY_ICON);
42 42
         if (screen.hasKey(KEY_PROPS)) {
43 43
             passedProps = ((ReadableNativeMap) screen.getMap(KEY_PROPS)).toHashMap();
44 44
         }

+ 4
- 7
android/app/src/main/java/com/reactnativenavigation/controllers/ScreenParams.java View File

@@ -8,15 +8,12 @@ import com.reactnativenavigation.views.TitleBarButton;
8 8
 import java.util.ArrayList;
9 9
 
10 10
 public class ScreenParams {
11
-    public String screenRegisteredId;
11
+    public String screenId;
12
+    public String screenInstanceId;
12 13
     public Bundle passProps;
13 14
     public ArrayList<TitleBarButton.Params> buttons;
14 15
     public String title;
15
-    public String label;
16
-    public String screenId;
17
-    public String screenInstanceId;
18
-    public String navigatorId;
19
-    public String navigatorEventId;
20
-    public Drawable icon;
16
+    public String tabLabel;
17
+    public Drawable tabIcon;
21 18
     public ScreenStyleParams styleParams;
22 19
 }

+ 6
- 3
android/app/src/main/java/com/reactnativenavigation/controllers/ScreenStyleParams.java View File

@@ -3,9 +3,12 @@ package com.reactnativenavigation.controllers;
3 3
 import android.support.annotation.ColorInt;
4 4
 
5 5
 public class ScreenStyleParams {
6
-    @ColorInt public int statusBarColor;
7
-    @ColorInt public int topBarColor;
8
-    @ColorInt public int navigationBarColor;
6
+    @ColorInt
7
+    public int statusBarColor;
8
+    @ColorInt
9
+    public int topBarColor;
10
+    @ColorInt
11
+    public int navigationBarColor;
9 12
     public boolean titleBarHidden;
10 13
     public boolean topBarHidden;
11 14
     public boolean backButtonHidden;

+ 2
- 2
android/app/src/main/java/com/reactnativenavigation/core/objects/_Button.java View File

@@ -8,7 +8,7 @@ public class _Button  {
8 8
 //
9 9
 //    private static final String KEY_ID = "id";
10 10
 //    private static final String KEY_TITLE = "title";
11
-//    private static final String KEY_ICON = "icon";
11
+//    private static final String KEY_ICON = "tabIcon";
12 12
 //    private static final String KEY_DISABLED = "disabled";
13 13
 //    private static final String KEY_SHOW_AS_ACTION = "showAsAction";
14 14
 //
@@ -34,7 +34,7 @@ public class _Button  {
34 34
 //    }
35 35
 //
36 36
 //    /**
37
-//     * @param dimensions The requested icon dimensions
37
+//     * @param dimensions The requested tabIcon dimensions
38 38
 //     */
39 39
 //    public Drawable getIcon(Context ctx, int dimensions) {
40 40
 //       return ImageLoader.getIcon(ctx, mIconSource, dimensions);

+ 7
- 7
android/app/src/main/java/com/reactnativenavigation/core/objects/_Screen.java View File

@@ -8,11 +8,11 @@ public class _Screen {
8 8
 //
9 9
 //    private static final String KEY_TITLE = "title";
10 10
 //    private static final String KEY_SCREEN = "screen";
11
-//    private static final String KEY_LABEL = "label";
11
+//    private static final String KEY_LABEL = "tabLabel";
12 12
 //    public static final String KEY_SCREEN_INSTANCE_ID = "screenInstanceID";
13 13
 //    public static final String KEY_NAVIGATOR_ID = "navigatorID";
14 14
 //    public static final String KEY_NAVIGATOR_EVENT_ID = "navigatorEventID";
15
-//    private static final String KEY_ICON = "icon";
15
+//    private static final String KEY_ICON = "tabIcon";
16 16
 //    private static final String KEY_NAVIGATOR_BUTTONS = "navigatorButtons";
17 17
 //    private static final String KEY_RIGHT_BUTTONS = "rightButtons";
18 18
 //    private static final String KEY_TOOL_BAR_STYLE = "navigatorStyle";
@@ -31,12 +31,12 @@ public class _Screen {
31 31
 //    private static final String KEY_PROPS = "passProps";
32 32
 //
33 33
 //    public String title;
34
-//    public final String label;
34
+//    public final String tabLabel;
35 35
 //    public final String screenId;
36 36
 //    public final String screenInstanceId;
37 37
 //    public final String navigatorId;
38 38
 //    public final String navigatorEventId;
39
-//    public final String icon;
39
+//    public final String tabIcon;
40 40
 //    public ArrayList<_Button> buttons;
41 41
 //    public final boolean backButtonHidden;
42 42
 //    public boolean bottomTabsHiddenOnScroll;
@@ -61,12 +61,12 @@ public class _Screen {
61 61
 //
62 62
 //    public _Screen(ReadableMap screen) {
63 63
 //        title = getString(screen, KEY_TITLE);
64
-//        label = getString(screen, KEY_LABEL);
64
+//        tabLabel = getString(screen, KEY_LABEL);
65 65
 //        screenId = getString(screen, KEY_SCREEN);
66 66
 //        screenInstanceId = getString(screen, KEY_SCREEN_INSTANCE_ID);
67 67
 //        navigatorId = getString(screen, KEY_NAVIGATOR_ID);
68 68
 //        navigatorEventId = getString(screen, KEY_NAVIGATOR_EVENT_ID);
69
-//        icon = getString(screen, KEY_ICON);
69
+//        tabIcon = getString(screen, KEY_ICON);
70 70
 //        if(screen.hasKey(KEY_PROPS)) {
71 71
 //            passedProps = ((ReadableNativeMap) screen.getMap(KEY_PROPS)).toHashMap();
72 72
 //        }
@@ -104,7 +104,7 @@ public class _Screen {
104 104
 //    }
105 105
 //
106 106
 //    public Drawable getIcon(Context ctx) {
107
-//        return ImageLoader.getIcon(ctx, icon);
107
+//        return ImageLoader.getIcon(ctx, tabIcon);
108 108
 //    }
109 109
 //
110 110
 //    public void setToolbarStyle(ReadableMap screen) {

+ 8
- 8
android/app/src/main/java/com/reactnativenavigation/views/RnnToolBar.java View File

@@ -45,13 +45,13 @@ public class RnnToolBar {
45 45
 //                R.string.drawer_close
46 46
 //        );
47 47
 //        mDrawerLayout.setDrawerListener(mDrawerToggle);
48
-//        setupDrawerIconAsync(drawerScreen.icon, screen);
48
+//        setupDrawerIconAsync(drawerScreen.tabIcon, screen);
49 49
 //
50 50
 //        return mDrawerToggle;
51 51
 //    }
52 52
 //
53
-//    public void setDrawerIcon(Drawable icon) {
54
-//        mDrawerIcon = icon;
53
+//    public void setDrawerIcon(Drawable tabIcon) {
54
+//        mDrawerIcon = tabIcon;
55 55
 //    }
56 56
 //
57 57
 //    public void showDrawer(boolean animated) {
@@ -293,13 +293,13 @@ public class RnnToolBar {
293 293
 //                MenuItem item = menu.add(Menu.NONE, button.getItemId(), size - i - 1, button.title);
294 294
 //                item.setShowAsAction(getMenuItemShowAction(button.showAsAction));
295 295
 //
296
-//                // Set button icon
296
+//                // Set button tabIcon
297 297
 //                if (button.hasIcon()) {
298
-//                    Drawable icon = icons.get(button.id);
298
+//                    Drawable tabIcon = icons.get(button.id);
299 299
 //                    if (mTintColor != null) {
300
-//                        ImageUtils.tint(icon, mTintColor);
300
+//                        ImageUtils.tint(tabIcon, mTintColor);
301 301
 //                    }
302
-//                    item.setIcon(icon);
302
+//                    item.setIcon(tabIcon);
303 303
 //                } else {
304 304
 //                    textButtons.add(button.title);
305 305
 //                }
@@ -312,7 +312,7 @@ public class RnnToolBar {
312 312
 //
313 313
 //            final RnnToolBar toolBar = mToolbarWR.get();
314 314
 //            if (toolBar != null) {
315
-//                // Tint overflow icon which appears when there's not enough space in Toolbar for icons
315
+//                // Tint overflow tabIcon which appears when there's not enough space in Toolbar for icons
316 316
 //                if (mTintColor != null) {
317 317
 //                    ImageUtils.tint(toolBar.getOverflowIcon(), mTintColor);
318 318
 //                }