Daniel Zlotin преди 8 години
родител
ревизия
9646d9fb9f

+ 0
- 13
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/StackController.java Целия файл

89
 	protected ViewGroup onCreateView() {
89
 	protected ViewGroup onCreateView() {
90
 		return new FrameLayout(getActivity());
90
 		return new FrameLayout(getActivity());
91
 	}
91
 	}
92
-
93
-//	public ViewController getChildController(final int index) {
94
-//		Iterator<ViewController> it = childControllers.descendingIterator();
95
-//		int currentIndex = 0;
96
-//		while (it.hasNext()) {
97
-//			ViewController controller = it.next();
98
-//			if (currentIndex == index) {
99
-//				return controller;
100
-//			}
101
-//			currentIndex++;
102
-//		}
103
-//		return null;
104
-//	}
105
 }
92
 }

+ 0
- 11
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/StackControllerTest.java Целия файл

172
 		assertHasSingleChildViewOfController(child2);
172
 		assertHasSingleChildViewOfController(child2);
173
 	}
173
 	}
174
 
174
 
175
-//	@Test
176
-//	public void getControllerAtIndex() throws Exception {
177
-//		uut.push(child1);
178
-//		uut.push(child2);
179
-//		uut.push(child3);
180
-//		assertThat(uut.getChildController(0)).isEqualTo(child1);
181
-//		assertThat(uut.getChildController(1)).isEqualTo(child2);
182
-//		assertThat(uut.getChildController(2)).isEqualTo(child3);
183
-//		assertThat(uut.getChildController(3)).isNull();
184
-//	}
185
-
186
 	private void assertHasSingleChildViewOfController(ViewController childController) {
175
 	private void assertHasSingleChildViewOfController(ViewController childController) {
187
 		assertThat(uut.getView().getChildCount()).isEqualTo(1);
176
 		assertThat(uut.getView().getChildCount()).isEqualTo(1);
188
 		assertThat(uut.getView().getChildAt(0)).isEqualTo(childController.getView());
177
 		assertThat(uut.getView().getChildAt(0)).isEqualTo(childController.getView());