fix two context menu crashes

This commit is contained in:
Andrew Dolgov 2012-09-20 01:39:38 +04:00
parent d361b0fec4
commit 786422a027
6 changed files with 15 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="100"
android:versionCode="101"
android:versionName="0.8.0" >
<uses-sdk

View File

@ -145,6 +145,10 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
if (cat != null)
menu.setHeaderTitle(cat.title);
if (!m_activity.isSmallScreen()) {
menu.findItem(R.id.browse_articles).setVisible(false);
}
super.onCreateContextMenu(menu, v, menuInfo);
}

View File

@ -181,8 +181,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
menu.setHeaderTitle(feed.title);
if (!m_activity.isSmallScreen()) {
menu.findItem(R.id.browse_headlines).setVisible(false);
menu.findItem(R.id.browse_feeds).setVisible(false);
menu.findItem(R.id.browse_articles).setVisible(false);
}
super.onCreateContextMenu(menu, v, menuInfo);

View File

@ -46,6 +46,10 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli
if (cursor != null)
menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title")));
if (!m_activity.isSmallScreen()) {
menu.findItem(R.id.browse_articles).setVisible(false);
}
super.onCreateContextMenu(menu, v, menuInfo);
}

View File

@ -85,6 +85,10 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene
if (cursor != null)
menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title")));
if (!m_activity.isSmallScreen()) {
menu.findItem(R.id.browse_articles).setVisible(false);
}
super.onCreateContextMenu(menu, v, menuInfo);
}