Small fixes

This commit is contained in:
Martin Fietz 2015-04-22 09:52:26 +02:00
parent efa35fed9c
commit 8ed0353c48
3 changed files with 1 additions and 24 deletions

View File

@ -13,7 +13,6 @@ import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
@ -616,16 +615,6 @@ public class AudioplayerActivity extends MediaplayerActivity implements ItemDesc
return drawerLayout != null && navDrawer != null && drawerLayout.isDrawerOpen(navDrawer);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
return super.onPrepareOptionsMenu(menu);
}
public interface AudioplayerContentFragment {
public void onDataSetChanged(Playable media);
}

View File

@ -381,8 +381,6 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
int viewType = parent.getAdapter().getItemViewType(position);
if (viewType != NavListAdapter.VIEW_TYPE_SECTION_DIVIDER && position != selectedNavListIndex) {
loadFragment(position, null);
// selectedNavListIndex = position;
// navAdapter.notifyDataSetChanged();
}
drawerLayout.closeDrawer(navDrawer);
}
@ -465,8 +463,7 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
public boolean onOptionsItemSelected(MenuItem item) {
if (drawerToggle.onOptionsItemSelected(item)) {
return true;
} else
if (item.getItemId() == android.R.id.home) {
} else if (item.getItemId() == android.R.id.home) {
if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
dismissChildFragment();
}

View File

@ -19,13 +19,4 @@ public class MenuItemUtils extends de.danoeh.antennapod.core.menuhandler.MenuIte
return item;
}
/**
* Checks if the navigation drawer of the DrawerActivity is opened. This can be useful for Fragments
* that hide their menu if the navigation drawer is open.
*
* @return True if the drawer is open, false otherwise (also if the parameter is null)
*/
public static boolean isActivityDrawerOpen(NavDrawerActivity activity) {
return activity != null && activity.isDrawerOpen();
}
}