Commit 13e5acbe authored by Adrien Maglo's avatar Adrien Maglo

VideoGridFragment: do not show the menu on group item long click

parent 7f7cb25e
......@@ -276,8 +276,6 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
private boolean handleContextItemSelected(MenuItem menu, int position) {
Media media = mVideoAdapter.getItem(position);
if (media instanceof MediaGroup)
return true;
switch (menu.getItemId())
{
case R.id.video_list_play:
......@@ -314,6 +312,11 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
// Do not show the menu of media group.
AdapterContextMenuInfo info = (AdapterContextMenuInfo)menuInfo;
Media media = mVideoAdapter.getItem(info.position);
if (media instanceof MediaGroup)
return;
MenuInflater inflater = getActivity().getMenuInflater();
inflater.inflate(R.menu.video_list, menu);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment