Action bar title fixes

This commit is contained in:
str4d
2014-11-17 04:09:52 +00:00
parent 5de173777e
commit c8683aeccd
2 changed files with 3 additions and 8 deletions

View File

@@ -51,8 +51,6 @@ public class EmailListActivity extends ActionBarActivity implements
private I2PAndroidHelper mHelper;
private RouterChoice mRouterChoice;
private CharSequence mDrawerTitle;
private CharSequence mTitle;
private SharedPreferences mSharedPrefs;
/**
@@ -90,7 +88,6 @@ public class EmailListActivity extends ActionBarActivity implements
// Initialize variables
mHelper = new I2PAndroidHelper(this);
mTitle = mDrawerTitle = getTitle();
mSharedPrefs = getSharedPreferences(SHARED_PREFS, 0);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerOuter = (RelativeLayout) findViewById(R.id.drawer_outer);
@@ -130,7 +127,6 @@ public class EmailListActivity extends ActionBarActivity implements
// Don't mark as opened if the user closed by dragging
// but uses the action bar icon to open
wasDragged = false;
getSupportActionBar().setTitle(mTitle);
supportInvalidateOptionsMenu();
}
@@ -139,9 +135,8 @@ public class EmailListActivity extends ActionBarActivity implements
if (wasDragged && !mSharedPrefs.getBoolean(PREF_NAV_DRAWER_OPENED, false)) {
SharedPreferences.Editor edit = mSharedPrefs.edit();
edit.putBoolean(PREF_NAV_DRAWER_OPENED, true);
edit.commit();
edit.apply();
}
getSupportActionBar().setTitle(mDrawerTitle);
supportInvalidateOptionsMenu();
}
@@ -362,8 +357,7 @@ public class EmailListActivity extends ActionBarActivity implements
@Override
public void setTitle(CharSequence title) {
mTitle = title;
getSupportActionBar().setTitle(mTitle);
getSupportActionBar().setTitle(title);
}
@Override

View File

@@ -50,6 +50,7 @@ public class ViewEmailActivity extends ActionBarActivity implements
// Enable ActionBar app icon to behave as action to go back
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(false);
Intent i = getIntent();
String folderName = i.getStringExtra(FOLDER_NAME);