Skip to content

Commit 3391902

Browse files
Spring WongSpring Wong
Spring Wong
authored and
Spring Wong
committed
added button for behavior testing
1 parent 8b790dd commit 3391902

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

app/src/main/java/com/spring/androidconductormvvmsample/controllers/DetailController.kt

+3
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,8 @@ class DetailController : Controller() {
4444
view.btnPopPush.clicks().subscribe({
4545
flowControl.presentFromRoot(DetailController())
4646
})
47+
view.btnPush.clicks().subscribe({
48+
flowControl.push(DetailController())
49+
})
4750
}
4851
}

app/src/main/res/layout/controller_detail.xml

+7-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
android:id="@+id/btnPopPush"
3434
android:layout_width="match_parent"
3535
android:layout_height="wrap_content"
36-
android:text="Click Me to pop and push to another controller"/>
36+
android:text="Click Me pop to root and push another controller"/>
37+
38+
<Button
39+
android:id="@+id/btnPush"
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content"
42+
android:text="Click Me to push new controller"/>
3743

3844
</LinearLayout>

0 commit comments

Comments
 (0)