Show toolbar on changing fragments

pull/215/head
M66B 7 months ago
parent 0155db1a4a
commit 4458b24fad

@ -119,6 +119,13 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL
| AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS);
toolbar.setLayoutParams(params);
getSupportFragmentManager().addOnBackStackChangedListener(new FragmentManager.OnBackStackChangedListener() {
@Override
public void onBackStackChanged() {
appbar.setExpanded(true);
}
});
}
setSupportActionBar(toolbar);

Loading…
Cancel
Save