mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 12:38:00 +01:00
rename layout photo_item to directory_item
This commit is contained in:
parent
d285b3e261
commit
6ee539eb52
3 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,7 @@ public class DirectoryAdapter extends BaseAdapter {
|
||||||
public View getView(int position, View view, ViewGroup parent) {
|
public View getView(int position, View view, ViewGroup parent) {
|
||||||
ViewHolder holder;
|
ViewHolder holder;
|
||||||
if (view == null) {
|
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);
|
holder = new ViewHolder(view);
|
||||||
view.setTag(holder);
|
view.setTag(holder);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -35,7 +35,8 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
|
||||||
private Map<String, Directory> getDirectories() {
|
private Map<String, Directory> getDirectories() {
|
||||||
final Map<String, Directory> directories = new TreeMap<>();
|
final Map<String, Directory> directories = new TreeMap<>();
|
||||||
final Uri uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
|
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()) {
|
if (cursor != null && cursor.moveToFirst()) {
|
||||||
final int pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA);
|
final int pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA);
|
||||||
|
|
Loading…
Reference in a new issue