headlines: in onContextItemSelected check if adapter context menu info is there
This commit is contained in:
parent
7bdfe419aa
commit
f172c5b2ac
@ -249,12 +249,15 @@ public class HeadlinesFragment extends Fragment {
|
|||||||
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item
|
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item
|
||||||
.getMenuInfo();
|
.getMenuInfo();
|
||||||
|
|
||||||
Article article = getArticleAtPosition(info.position - m_adapter.getHeaderCount());
|
if (info != null) {
|
||||||
|
|
||||||
if (!onArticleMenuItemSelected(item, article, info.position))
|
Article article = getArticleAtPosition(info.position - m_adapter.getHeaderCount());
|
||||||
return super.onContextItemSelected(item);
|
|
||||||
else
|
if (!onArticleMenuItemSelected(item, article, info.position))
|
||||||
return true;
|
return super.onContextItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onContextItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public HeadlinesFragment() {
|
public HeadlinesFragment() {
|
||||||
|
Loading…
Reference in New Issue
Block a user