diff --git a/app/src/main/java/gallery/simplemobiletools/com/DirectoryAdapter.java b/app/src/main/java/gallery/simplemobiletools/com/DirectoryAdapter.java index 9f241f94e..fa2c32ef6 100644 --- a/app/src/main/java/gallery/simplemobiletools/com/DirectoryAdapter.java +++ b/app/src/main/java/gallery/simplemobiletools/com/DirectoryAdapter.java @@ -27,7 +27,7 @@ public class DirectoryAdapter extends BaseAdapter { public View getView(int position, View view, ViewGroup parent) { ViewHolder holder; if (view == null) { - view = inflater.inflate(R.layout.photo_item, parent, false); + view = inflater.inflate(R.layout.directory_item, parent, false); holder = new ViewHolder(view); view.setTag(holder); } else { diff --git a/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java b/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java index 6690bfc83..1bfc1ceac 100644 --- a/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java +++ b/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java @@ -35,7 +35,8 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen private Map getDirectories() { final Map directories = new TreeMap<>(); final Uri uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; - final Cursor cursor = getContentResolver().query(uri, null, null, null, null); + final String[] columns = {MediaStore.Images.Media.DATA}; + final Cursor cursor = getContentResolver().query(uri, columns, null, null, null); if (cursor != null && cursor.moveToFirst()) { final int pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA); diff --git a/app/src/main/res/layout/photo_item.xml b/app/src/main/res/layout/directory_item.xml similarity index 100% rename from app/src/main/res/layout/photo_item.xml rename to app/src/main/res/layout/directory_item.xml