|
@@ -1,6 +1,5 @@
|
1
|
1
|
package com.reactnativenavigation.layouts;
|
2
|
2
|
|
3
|
|
-import android.graphics.Color;
|
4
|
3
|
import android.support.v7.app.AppCompatActivity;
|
5
|
4
|
import android.view.View;
|
6
|
5
|
import android.widget.RelativeLayout;
|
|
@@ -13,7 +12,6 @@ import com.reactnativenavigation.params.TitleBarLeftButtonParams;
|
13
|
12
|
import com.reactnativenavigation.screens.ScreenStack;
|
14
|
13
|
import com.reactnativenavigation.views.BottomTabs;
|
15
|
14
|
|
16
|
|
-import java.util.ArrayList;
|
17
|
15
|
import java.util.List;
|
18
|
16
|
|
19
|
17
|
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
|
|
@@ -129,7 +127,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
|
129
|
127
|
currentScreenStack.destroy();
|
130
|
128
|
removeView(currentScreenStack);
|
131
|
129
|
|
132
|
|
- ScreenStack newStack = new ScreenStack(getContext(), params);
|
|
130
|
+ ScreenStack newStack = new ScreenStack(activity, params);
|
133
|
131
|
screenStacks[currentStackIndex] = newStack;
|
134
|
132
|
addView(newStack, 0, new RelativeLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
|
135
|
133
|
}
|
|
@@ -158,7 +156,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
|
158
|
156
|
}
|
159
|
157
|
|
160
|
158
|
private void createAndAddScreenStack(int position) {
|
161
|
|
- ScreenStack newStack = new ScreenStack(getContext(), params.tabParams.get(position));
|
|
159
|
+ ScreenStack newStack = new ScreenStack(activity, params.tabParams.get(position));
|
162
|
160
|
screenStacks[position] = newStack;
|
163
|
161
|
addView(newStack, 0, new LayoutParams(MATCH_PARENT, MATCH_PARENT));
|
164
|
162
|
}
|