remove compat check for actionbar up enabled
This commit is contained in:
parent
8d85dc931f
commit
c59613fe05
@ -58,10 +58,8 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
if (intent.getParcelableExtra("feed") != null || intent.getParcelableExtra("category") != null ||
|
if (intent.getParcelableExtra("feed") != null || intent.getParcelableExtra("category") != null ||
|
||||||
intent.getParcelableExtra("article") != null) {
|
intent.getParcelableExtra("article") != null) {
|
||||||
|
|
||||||
if (!isCompatMode()) {
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
m_actionbarUpEnabled = true;
|
||||||
m_actionbarUpEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Feed feed = (Feed) intent.getParcelableExtra("feed");
|
Feed feed = (Feed) intent.getParcelableExtra("feed");
|
||||||
FeedCategory cat = (FeedCategory) intent.getParcelableExtra("category");
|
FeedCategory cat = (FeedCategory) intent.getParcelableExtra("category");
|
||||||
@ -127,7 +125,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
container.setWeightSum(3f);
|
container.setWeightSum(3f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isCompatMode() && m_actionbarUpEnabled) {
|
if (m_actionbarUpEnabled) {
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,9 +33,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
|
|||||||
|
|
||||||
setContentView(R.layout.headlines);
|
setContentView(R.layout.headlines);
|
||||||
|
|
||||||
if (!isCompatMode()) {
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
|
|
||||||
m_actionbarUpEnabled = savedInstanceState.getBoolean("actionbarUpEnabled");
|
m_actionbarUpEnabled = savedInstanceState.getBoolean("actionbarUpEnabled");
|
||||||
|
|
||||||
if (!isCompatMode() && m_actionbarUpEnabled) {
|
if (m_actionbarUpEnabled) {
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,10 +55,8 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
|
|||||||
if (intent.getIntExtra("feed", -10000) != -10000 || intent.getIntExtra("category", -10000) != -10000 ||
|
if (intent.getIntExtra("feed", -10000) != -10000 || intent.getIntExtra("category", -10000) != -10000 ||
|
||||||
intent.getIntExtra("article", -10000) != -10000) {
|
intent.getIntExtra("article", -10000) != -10000) {
|
||||||
|
|
||||||
if (!isCompatMode()) {
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
m_actionbarUpEnabled = true;
|
||||||
m_actionbarUpEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
|
|
||||||
|
@ -33,9 +33,7 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline
|
|||||||
|
|
||||||
setContentView(R.layout.headlines);
|
setContentView(R.layout.headlines);
|
||||||
|
|
||||||
if (!isCompatMode()) {
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
setSmallScreen(findViewById(R.id.headlines_fragment) == null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user