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
|
||||
.getMenuInfo();
|
||||
|
||||
if (info != null) {
|
||||
|
||||
Article article = getArticleAtPosition(info.position - m_adapter.getHeaderCount());
|
||||
|
||||
if (!onArticleMenuItemSelected(item, article, info.position))
|
||||
return super.onContextItemSelected(item);
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onContextItemSelected(item);
|
||||
}
|
||||
|
||||
public HeadlinesFragment() {
|
||||
|
Loading…
Reference in New Issue
Block a user