Added a setting per Activity to device if tab bar should always be hidden
This commit is contained in:
parent
80e1d9a78d
commit
b16d3ba9f0
4 changed files with 13 additions and 4 deletions
|
@ -49,6 +49,7 @@ public class AboutActivity extends MainActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mOnBackPressGoHome = false;
|
||||
mAlwaysHideTabBar = true;
|
||||
|
||||
// Uses the fragment container layout to inflate the about view instead of using a fragment
|
||||
View aboutView = LayoutInflater.from(this).inflate(R.layout.about, null, false);
|
||||
|
|
|
@ -91,6 +91,7 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
|||
private StatusFragment mStatusFragment;
|
||||
|
||||
protected boolean mOnBackPressGoHome;
|
||||
protected boolean mAlwaysHideTabBar;
|
||||
protected String[] mPermissionsToHave;
|
||||
|
||||
private CoreListenerStub mListener;
|
||||
|
@ -102,6 +103,7 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
|||
setContentView(R.layout.main);
|
||||
|
||||
mOnBackPressGoHome = true;
|
||||
mAlwaysHideTabBar = false;
|
||||
|
||||
RelativeLayout history = findViewById(R.id.history);
|
||||
history.setOnClickListener(
|
||||
|
@ -298,8 +300,10 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
|||
super.onResume();
|
||||
|
||||
hideTopBar();
|
||||
if (getFragmentManager().getBackStackEntryCount() == 0
|
||||
|| !getResources().getBoolean(R.bool.hide_bottom_bar_on_second_level_views)) {
|
||||
if (!mAlwaysHideTabBar
|
||||
&& (getFragmentManager().getBackStackEntryCount() == 0
|
||||
|| !getResources()
|
||||
.getBoolean(R.bool.hide_bottom_bar_on_second_level_views))) {
|
||||
showTabBar();
|
||||
}
|
||||
|
||||
|
@ -387,8 +391,10 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
|||
public boolean popBackStack() {
|
||||
if (getFragmentManager().getBackStackEntryCount() > 0) {
|
||||
getFragmentManager().popBackStackImmediate();
|
||||
if (getFragmentManager().getBackStackEntryCount() == 0
|
||||
&& getResources().getBoolean(R.bool.hide_bottom_bar_on_second_level_views)) {
|
||||
if (!mAlwaysHideTabBar
|
||||
&& (getFragmentManager().getBackStackEntryCount() == 0
|
||||
&& getResources()
|
||||
.getBoolean(R.bool.hide_bottom_bar_on_second_level_views))) {
|
||||
showTabBar();
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -52,6 +52,7 @@ public class RecordingsActivity extends MainActivity
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mOnBackPressGoHome = false;
|
||||
mAlwaysHideTabBar = true;
|
||||
|
||||
// Uses the fragment container layout to inflate the about view instead of using a fragment
|
||||
View recordingsView =
|
||||
|
|
|
@ -38,6 +38,7 @@ public class SettingsActivity extends MainActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mOnBackPressGoHome = false;
|
||||
mAlwaysHideTabBar = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue