allow using actionbar <- button to open parent category if backstack is not empty
This commit is contained in:
parent
095721c704
commit
73cf0c07a6
@ -296,14 +296,19 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
|
||||||
|
if (item.getItemId() == android.R.id.home && getSupportFragmentManager().getBackStackEntryCount() > 0) {
|
||||||
|
if (m_drawerLayout != null && m_drawerLayout.isDrawerOpen(Gravity.START)) {
|
||||||
|
getSupportFragmentManager().popBackStack();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_drawerToggle != null && m_drawerToggle.onOptionsItemSelected(item)) {
|
if (m_drawerToggle != null && m_drawerToggle.onOptionsItemSelected(item)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case android.R.id.home:
|
|
||||||
//getSupportFragmentManager().popBackStack();
|
|
||||||
return true;
|
|
||||||
case R.id.headlines_toggle_sort_order:
|
case R.id.headlines_toggle_sort_order:
|
||||||
Dialog dialog = new Dialog(this);
|
Dialog dialog = new Dialog(this);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user