fix for actionbar up button disappearing on rotate when switching
between slide and normal sidebar
This commit is contained in:
parent
5189150253
commit
ee687410d8
@ -103,8 +103,17 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
m_actionbarRevertDepth = savedInstanceState.getInt("actionbarRevertDepth");
|
||||
m_feedIsSelected = savedInstanceState.getBoolean("feedIsSelected");
|
||||
|
||||
if (m_slidingMenu != null && m_feedIsSelected == false)
|
||||
if (m_slidingMenu != null && m_feedIsSelected == false) {
|
||||
m_slidingMenu.showMenu();
|
||||
} else if (m_slidingMenu != null) {
|
||||
m_actionbarUpEnabled = true;
|
||||
} else {
|
||||
m_actionbarUpEnabled = m_actionbarRevertDepth > 0;
|
||||
}
|
||||
|
||||
if (m_actionbarUpEnabled) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
if (!isSmallScreen()) {
|
||||
// temporary hack because FeedsActivity doesn't track whether active feed is open
|
||||
@ -113,10 +122,6 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
if (container != null)
|
||||
container.setWeightSum(3f);
|
||||
}
|
||||
|
||||
if (m_actionbarUpEnabled) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
/* if (!isCompatMode() && !isSmallScreen()) {
|
||||
|
@ -77,8 +77,13 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
||||
m_actionbarRevertDepth = savedInstanceState.getInt("actionbarRevertDepth");
|
||||
m_feedIsSelected = savedInstanceState.getBoolean("feedIsSelected");
|
||||
|
||||
if (!m_feedIsSelected && m_slidingMenu != null)
|
||||
if (m_slidingMenu != null && m_feedIsSelected == false) {
|
||||
m_slidingMenu.showMenu();
|
||||
} else if (m_slidingMenu != null) {
|
||||
m_actionbarUpEnabled = true;
|
||||
} else {
|
||||
m_actionbarUpEnabled = m_actionbarRevertDepth > 0;
|
||||
}
|
||||
|
||||
if (m_actionbarUpEnabled) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user