I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 61d5ba5a authored by str4d's avatar str4d
Browse files

Toolbar back navigation

parent 339f688b
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,6 @@ public class BrowserConfigActivity extends ActionBarActivity implements
* device.
*/
private boolean mTwoPane;
private boolean mDetailShowing;
@Override
public void onCreate(Bundle savedInstanceState) {
......@@ -27,6 +26,7 @@ public class BrowserConfigActivity extends ActionBarActivity implements
// Set the action bar
Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (findViewById(R.id.detail_fragment) != null) {
// The detail container view will be present only in the
......@@ -54,15 +54,6 @@ public class BrowserConfigActivity extends ActionBarActivity implements
}
}
@Override
public void onBackPressed() {
if (mDetailShowing) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
mDetailShowing = false;
}
super.onBackPressed();
}
// BrowserAdapter.OnBrowserSelected
@Override
......@@ -98,8 +89,6 @@ public class BrowserConfigActivity extends ActionBarActivity implements
.replace(R.id.main_fragment, configFrag)
.addToBackStack("config" + browser.packageName)
.commit();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mDetailShowing = true;
}
}
}
......@@ -24,7 +24,6 @@ public class HelpActivity extends ActionBarActivity implements
* device.
*/
private boolean mTwoPane;
private boolean mDetailShowing;
@Override
public void onCreate(Bundle savedInstanceState) {
......@@ -34,6 +33,7 @@ public class HelpActivity extends ActionBarActivity implements
// Set the action bar
Toolbar toolbar = (Toolbar) findViewById(R.id.main_toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (findViewById(R.id.detail_fragment) != null) {
// The detail container view will be present only in the
......@@ -84,15 +84,6 @@ public class HelpActivity extends ActionBarActivity implements
}
}
@Override
public void onBackPressed() {
if (mDetailShowing) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
mDetailShowing = false;
}
super.onBackPressed();
}
// HelpListFragment.OnEntrySelectedListener
@Override
......@@ -129,8 +120,6 @@ public class HelpActivity extends ActionBarActivity implements
.replace(R.id.main_fragment, f)
.addToBackStack("help" + category)
.commit();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mDetailShowing = true;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment