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) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mOnBackPressGoHome = false;
|
mOnBackPressGoHome = false;
|
||||||
|
mAlwaysHideTabBar = true;
|
||||||
|
|
||||||
// Uses the fragment container layout to inflate the about view instead of using a fragment
|
// 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);
|
View aboutView = LayoutInflater.from(this).inflate(R.layout.about, null, false);
|
||||||
|
|
|
@ -91,6 +91,7 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
||||||
private StatusFragment mStatusFragment;
|
private StatusFragment mStatusFragment;
|
||||||
|
|
||||||
protected boolean mOnBackPressGoHome;
|
protected boolean mOnBackPressGoHome;
|
||||||
|
protected boolean mAlwaysHideTabBar;
|
||||||
protected String[] mPermissionsToHave;
|
protected String[] mPermissionsToHave;
|
||||||
|
|
||||||
private CoreListenerStub mListener;
|
private CoreListenerStub mListener;
|
||||||
|
@ -102,6 +103,7 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
||||||
setContentView(R.layout.main);
|
setContentView(R.layout.main);
|
||||||
|
|
||||||
mOnBackPressGoHome = true;
|
mOnBackPressGoHome = true;
|
||||||
|
mAlwaysHideTabBar = false;
|
||||||
|
|
||||||
RelativeLayout history = findViewById(R.id.history);
|
RelativeLayout history = findViewById(R.id.history);
|
||||||
history.setOnClickListener(
|
history.setOnClickListener(
|
||||||
|
@ -298,8 +300,10 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
hideTopBar();
|
hideTopBar();
|
||||||
if (getFragmentManager().getBackStackEntryCount() == 0
|
if (!mAlwaysHideTabBar
|
||||||
|| !getResources().getBoolean(R.bool.hide_bottom_bar_on_second_level_views)) {
|
&& (getFragmentManager().getBackStackEntryCount() == 0
|
||||||
|
|| !getResources()
|
||||||
|
.getBoolean(R.bool.hide_bottom_bar_on_second_level_views))) {
|
||||||
showTabBar();
|
showTabBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,8 +391,10 @@ public abstract class MainActivity extends LinphoneGenericActivity
|
||||||
public boolean popBackStack() {
|
public boolean popBackStack() {
|
||||||
if (getFragmentManager().getBackStackEntryCount() > 0) {
|
if (getFragmentManager().getBackStackEntryCount() > 0) {
|
||||||
getFragmentManager().popBackStackImmediate();
|
getFragmentManager().popBackStackImmediate();
|
||||||
if (getFragmentManager().getBackStackEntryCount() == 0
|
if (!mAlwaysHideTabBar
|
||||||
&& getResources().getBoolean(R.bool.hide_bottom_bar_on_second_level_views)) {
|
&& (getFragmentManager().getBackStackEntryCount() == 0
|
||||||
|
&& getResources()
|
||||||
|
.getBoolean(R.bool.hide_bottom_bar_on_second_level_views))) {
|
||||||
showTabBar();
|
showTabBar();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -52,6 +52,7 @@ public class RecordingsActivity extends MainActivity
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mOnBackPressGoHome = false;
|
mOnBackPressGoHome = false;
|
||||||
|
mAlwaysHideTabBar = true;
|
||||||
|
|
||||||
// Uses the fragment container layout to inflate the about view instead of using a fragment
|
// Uses the fragment container layout to inflate the about view instead of using a fragment
|
||||||
View recordingsView =
|
View recordingsView =
|
||||||
|
|
|
@ -38,6 +38,7 @@ public class SettingsActivity extends MainActivity {
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mOnBackPressGoHome = false;
|
mOnBackPressGoHome = false;
|
||||||
|
mAlwaysHideTabBar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue