Procházet zdrojové kódy

static navigationOptions

Daniel Zlotin před 7 roky
rodič
revize
5346561cb8

+ 1
- 3
AndroidE2E/app/src/androidTest/java/com/reactnativenavigation/e2e/androide2e/ScreenStyleStaticTest.java Zobrazit soubor

@@ -2,17 +2,15 @@ package com.reactnativenavigation.e2e.androide2e;
2 2
 
3 3
 import android.support.test.uiautomator.By;
4 4
 
5
-import org.junit.Ignore;
6 5
 import org.junit.Test;
7 6
 
8 7
 public class ScreenStyleStaticTest extends BaseTest {
9 8
 
10 9
 	@Test
11
-	@Ignore
12 10
 	public void declareNavigationStyleOnContainerComponent() throws Exception {
13 11
 		launchTheApp();
14 12
 		assertMainShown();
15
-		elementByText("PUSH").click();
13
+		elementByText("PUSH OPTIONS SCREEN").click();
16 14
 		assertExists(By.text("Static Title"));
17 15
 	}
18 16
 }

+ 1
- 0
AndroidE2E/app/src/androidTest/java/com/reactnativenavigation/e2e/androide2e/TopLevelApiTest.java Zobrazit soubor

@@ -2,6 +2,7 @@ package com.reactnativenavigation.e2e.androide2e;
2 2
 
3 3
 import android.support.test.uiautomator.By;
4 4
 
5
+import org.junit.Ignore;
5 6
 import org.junit.Test;
6 7
 
7 8
 public class TopLevelApiTest extends BaseTest {

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java Zobrazit soubor

@@ -6,7 +6,7 @@ import android.support.v7.app.AppCompatActivity;
6 6
 import android.view.KeyEvent;
7 7
 
8 8
 import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
9
-import com.reactnativenavigation.viewcontrollers.Navigator;
9
+import com.reactnativenavigation.layout.Navigator;
10 10
 
11 11
 public class NavigationActivity extends AppCompatActivity implements DefaultHardwareBackBtnHandler {
12 12
 	private Navigator navigator;

lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/Navigator.java → lib/android/app/src/main/java/com/reactnativenavigation/layout/Navigator.java Zobrazit soubor

@@ -1,4 +1,4 @@
1
-package com.reactnativenavigation.viewcontrollers;
1
+package com.reactnativenavigation.layout;
2 2
 
3 3
 import android.app.Activity;
4 4
 import android.support.annotation.NonNull;
@@ -6,6 +6,9 @@ import android.view.ViewGroup;
6 6
 import android.widget.FrameLayout;
7 7
 
8 8
 import com.reactnativenavigation.utils.CompatUtils;
9
+import com.reactnativenavigation.viewcontrollers.ParentController;
10
+import com.reactnativenavigation.viewcontrollers.StackController;
11
+import com.reactnativenavigation.viewcontrollers.ViewController;
9 12
 
10 13
 import java.util.Collection;
11 14
 import java.util.Collections;

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/layout/ReactRootViewController.java Zobrazit soubor

@@ -18,7 +18,7 @@ public class ReactRootViewController extends ViewController {
18 18
 	private boolean attachedToReactInstance = false;
19 19
 	private ReactRootView reactRootView;
20 20
 
21
-	public ReactRootViewController(final Activity activity, final String id, final String name, String title, final ReactInstanceManager reactInstanceManager) {
21
+	public ReactRootViewController(final Activity activity, final String id, final String name, final String title, final ReactInstanceManager reactInstanceManager) {
22 22
 		super(activity, id);
23 23
 		this.name = name;
24 24
 		this.title = title;

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/react/NavigationModule.java Zobrazit soubor

@@ -13,7 +13,7 @@ import com.reactnativenavigation.layout.LayoutNode;
13 13
 import com.reactnativenavigation.parse.JSONParser;
14 14
 import com.reactnativenavigation.parse.LayoutNodeParser;
15 15
 import com.reactnativenavigation.utils.UiThread;
16
-import com.reactnativenavigation.viewcontrollers.Navigator;
16
+import com.reactnativenavigation.layout.Navigator;
17 17
 import com.reactnativenavigation.viewcontrollers.ViewController;
18 18
 
19 19
 public class NavigationModule extends ReactContextBaseJavaModule {

+ 1
- 0
lib/android/app/src/main/java/com/reactnativenavigation/views/TopBar.java Zobrazit soubor

@@ -10,6 +10,7 @@ public class TopBar extends AppBarLayout {
10 10
 	public TopBar(final Activity context) {
11 11
 		super(context);
12 12
 		titleBar = new Toolbar(context);
13
+		addView(titleBar);
13 14
 	}
14 15
 
15 16
 	public void setTitle(String title) {

+ 1
- 0
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/NavigatorTest.java Zobrazit soubor

@@ -4,6 +4,7 @@ import android.app.Activity;
4 4
 import android.support.annotation.NonNull;
5 5
 
6 6
 import com.reactnativenavigation.BaseTest;
7
+import com.reactnativenavigation.layout.Navigator;
7 8
 import com.reactnativenavigation.mocks.SimpleViewController;
8 9
 import com.reactnativenavigation.mocks.TestStackAnimator;
9 10
 import com.reactnativenavigation.utils.CompatUtils;