fix two context menu crashes
This commit is contained in:
parent
d361b0fec4
commit
786422a027
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="100"
|
android:versionCode="101"
|
||||||
android:versionName="0.8.0" >
|
android:versionName="0.8.0" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
|
@ -145,6 +145,10 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
|||||||
if (cat != null)
|
if (cat != null)
|
||||||
menu.setHeaderTitle(cat.title);
|
menu.setHeaderTitle(cat.title);
|
||||||
|
|
||||||
|
if (!m_activity.isSmallScreen()) {
|
||||||
|
menu.findItem(R.id.browse_articles).setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
super.onCreateContextMenu(menu, v, menuInfo);
|
super.onCreateContextMenu(menu, v, menuInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -181,8 +181,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
menu.setHeaderTitle(feed.title);
|
menu.setHeaderTitle(feed.title);
|
||||||
|
|
||||||
if (!m_activity.isSmallScreen()) {
|
if (!m_activity.isSmallScreen()) {
|
||||||
menu.findItem(R.id.browse_headlines).setVisible(false);
|
menu.findItem(R.id.browse_articles).setVisible(false);
|
||||||
menu.findItem(R.id.browse_feeds).setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onCreateContextMenu(menu, v, menuInfo);
|
super.onCreateContextMenu(menu, v, menuInfo);
|
||||||
|
@ -250,7 +250,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
|
|
||||||
menu.findItem(R.id.set_labels).setEnabled(m_activity.getApiLevel() >= 1);
|
menu.findItem(R.id.set_labels).setEnabled(m_activity.getApiLevel() >= 1);
|
||||||
menu.findItem(R.id.article_set_note).setEnabled(m_activity.getApiLevel() >= 1);
|
menu.findItem(R.id.article_set_note).setEnabled(m_activity.getApiLevel() >= 1);
|
||||||
|
|
||||||
super.onCreateContextMenu(menu, v, menuInfo);
|
super.onCreateContextMenu(menu, v, menuInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,10 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli
|
|||||||
if (cursor != null)
|
if (cursor != null)
|
||||||
menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title")));
|
menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title")));
|
||||||
|
|
||||||
|
if (!m_activity.isSmallScreen()) {
|
||||||
|
menu.findItem(R.id.browse_articles).setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
super.onCreateContextMenu(menu, v, menuInfo);
|
super.onCreateContextMenu(menu, v, menuInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,10 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene
|
|||||||
if (cursor != null)
|
if (cursor != null)
|
||||||
menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title")));
|
menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title")));
|
||||||
|
|
||||||
|
if (!m_activity.isSmallScreen()) {
|
||||||
|
menu.findItem(R.id.browse_articles).setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
super.onCreateContextMenu(menu, v, menuInfo);
|
super.onCreateContextMenu(menu, v, menuInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user