Skip to content

Commit 52586c4

Browse files
committed
fix(app): cannot navigation up by clicking the back button on ActionBar
Signed-off-by: Trumeet <[email protected]>
1 parent 89be0c1 commit 52586c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/moe/yuuta/mipushtester/MainActivity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
1414
setContentView(R.layout.activity_main);
1515
NavigationUI.setupActionBarWithNavController(this, Navigation.findNavController(this, R.id.nav_host));
1616
}
17+
18+
@Override
19+
public boolean onSupportNavigateUp() {
20+
return Navigation.findNavController(this, R.id.nav_host).navigateUp();
21+
}
1722
}

0 commit comments

Comments
 (0)