do not intercept clicks in FileSystemAdapter

This commit is contained in:
Adrian Ulrich 2016-07-24 14:43:07 +02:00
parent de0247b04a
commit d0e1882f55
2 changed files with 7 additions and 5 deletions

View File

@ -48,7 +48,6 @@ import java.util.regex.Pattern;
public class FileSystemAdapter
extends BaseAdapter
implements LibraryAdapter
, View.OnClickListener
{
private static final Pattern SPACE_SPLIT = Pattern.compile("\\s+");
private static final Pattern FILE_SEPARATOR = Pattern.compile(File.separator);
@ -200,7 +199,6 @@ public class FileSystemAdapter
holder = new ViewHolder();
row.setTag(holder);
row.setOnClickListener(this);
row.getCoverView().setImageDrawable(mFolderIcon);
} else {
row = (DraggableRow)convertView;
@ -306,8 +304,12 @@ public class FileSystemAdapter
return intent;
}
@Override
public void onClick(View view) {
/**
* A row was clicked: this was dispatched by LibraryPagerAdapter
*
* @param View view which was clicked
*/
public void onViewClicked(View view) {
Intent intent = createData(view);
boolean isFolder = intent.getBooleanExtra(LibraryAdapter.DATA_EXPANDABLE, false);

View File

@ -844,7 +844,7 @@ public class LibraryPagerAdapter
public void onItemClick (AdapterView<?> parent, View view, int position, long id) {
int type = (Integer)parent.getTag();
if (type == MediaUtils.TYPE_FILE) {
mFilesAdapter.onClick(view);
mFilesAdapter.onViewClicked(view);
} else {
Intent intent = id == -1 ? createHeaderIntent(view) : mCurrentAdapter.createData(view);
mActivity.onItemClicked(intent);