rename layout photo_item to directory_item
This commit is contained in:
parent
d285b3e261
commit
6ee539eb52
|
@ -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 {
|
||||
|
|
|
@ -35,7 +35,8 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
|
|||
private Map<String, Directory> getDirectories() {
|
||||
final Map<String, Directory> 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);
|
||||
|
|
Loading…
Reference in New Issue