remove compat check for actionbar up enabled

This commit is contained in:
Andrew Dolgov 2013-05-18 14:01:47 +04:00
parent 8d85dc931f
commit c59613fe05
4 changed files with 8 additions and 16 deletions

View File

@ -58,10 +58,8 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
if (intent.getParcelableExtra("feed") != null || intent.getParcelableExtra("category") != null ||
intent.getParcelableExtra("article") != null) {
if (!isCompatMode()) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
m_actionbarUpEnabled = true;
}
Feed feed = (Feed) intent.getParcelableExtra("feed");
FeedCategory cat = (FeedCategory) intent.getParcelableExtra("category");
@ -127,7 +125,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
container.setWeightSum(3f);
}
if (!isCompatMode() && m_actionbarUpEnabled) {
if (m_actionbarUpEnabled) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
}

View File

@ -33,9 +33,7 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
setContentView(R.layout.headlines);
if (!isCompatMode()) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
setSmallScreen(findViewById(R.id.headlines_fragment) == null);

View File

@ -45,7 +45,7 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
m_actionbarUpEnabled = savedInstanceState.getBoolean("actionbarUpEnabled");
if (!isCompatMode() && m_actionbarUpEnabled) {
if (m_actionbarUpEnabled) {
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 ||
intent.getIntExtra("article", -10000) != -10000) {
if (!isCompatMode()) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
m_actionbarUpEnabled = true;
}
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();

View File

@ -33,9 +33,7 @@ public class OfflineHeadlinesActivity extends OfflineActivity implements Offline
setContentView(R.layout.headlines);
if (!isCompatMode()) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
setSmallScreen(findViewById(R.id.headlines_fragment) == null);