diff --git a/collect_app/src/main/java/org/odk/collect/android/adapters/FileArrayAdapter.java b/collect_app/src/main/java/org/odk/collect/android/adapters/FileArrayAdapter.java index 1cd02082ba3..f972418d4b1 100644 --- a/collect_app/src/main/java/org/odk/collect/android/adapters/FileArrayAdapter.java +++ b/collect_app/src/main/java/org/odk/collect/android/adapters/FileArrayAdapter.java @@ -75,27 +75,22 @@ public View getView(int position, View convertView, ViewGroup parent) { .format(new Date(o.getDate().getValue())); } - ImageView iv = (ImageView) v.findViewById(R.id.image); - CheckBox cb = (CheckBox) v.findViewById(R.id.checkbox); + ImageView iv = v.findViewById(R.id.image); + CheckBox cb = v.findViewById(R.id.checkbox); - if (o.getType() == 1) { - Drawable d = ContextCompat.getDrawable(context, R.drawable.ic_download); + if (o.getType() == DriveListItem.FILE) { + Drawable d = ContextCompat.getDrawable(context, R.drawable.ic_file_download); iv.setImageDrawable(d); cb.setVisibility(View.VISIBLE); } - if (o.getType() == 3) { - Drawable d = ContextCompat.getDrawable(context, R.drawable.ic_back); - iv.setImageDrawable(d); - cb.setVisibility(View.GONE); - } - if (o.getType() == 2 || o.getType() == 4 || o.getType() == 5) { + if (o.getType() == DriveListItem.DIR) { Drawable d = ContextCompat.getDrawable(context, R.drawable.ic_folder); iv.setImageDrawable(d); cb.setVisibility(View.GONE); } - TextView t1 = (TextView) v.findViewById(R.id.text1); - TextView t2 = (TextView) v.findViewById(R.id.text2); + TextView t1 = v.findViewById(R.id.text1); + TextView t2 = v.findViewById(R.id.text2); if (t1 != null) { t1.setText(o.getName()); diff --git a/collect_app/src/main/java/org/odk/collect/android/logic/DriveListItem.java b/collect_app/src/main/java/org/odk/collect/android/logic/DriveListItem.java index a36160e757a..ae18bace415 100644 --- a/collect_app/src/main/java/org/odk/collect/android/logic/DriveListItem.java +++ b/collect_app/src/main/java/org/odk/collect/android/logic/DriveListItem.java @@ -34,12 +34,8 @@ public class DriveListItem implements Comparable, Parcelable { private DateTime date; private int type; - public static final int FILE = 1; public static final int DIR = 2; - public static final int UP = 3; - public static final int MY_DRIVE = 4; - public static final int SHARED_WITH_ME = 5; public DriveListItem(String n, String d, DateTime dt, String p, String img, int type, String driveId, String parentId) { diff --git a/collect_app/src/main/res/drawable-hdpi/ic_back.png b/collect_app/src/main/res/drawable-hdpi/ic_back.png deleted file mode 100644 index a04996aef6c..00000000000 Binary files a/collect_app/src/main/res/drawable-hdpi/ic_back.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-hdpi/ic_download.png b/collect_app/src/main/res/drawable-hdpi/ic_download.png deleted file mode 100644 index 4b3a42f2217..00000000000 Binary files a/collect_app/src/main/res/drawable-hdpi/ic_download.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-hdpi/ic_folder.png b/collect_app/src/main/res/drawable-hdpi/ic_folder.png deleted file mode 100644 index e8d01f69521..00000000000 Binary files a/collect_app/src/main/res/drawable-hdpi/ic_folder.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-mdpi/ic_back.png b/collect_app/src/main/res/drawable-mdpi/ic_back.png deleted file mode 100644 index 731546132f5..00000000000 Binary files a/collect_app/src/main/res/drawable-mdpi/ic_back.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-mdpi/ic_download.png b/collect_app/src/main/res/drawable-mdpi/ic_download.png deleted file mode 100644 index d9aacea4c67..00000000000 Binary files a/collect_app/src/main/res/drawable-mdpi/ic_download.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-mdpi/ic_folder.png b/collect_app/src/main/res/drawable-mdpi/ic_folder.png deleted file mode 100644 index 1d25a2d1f61..00000000000 Binary files a/collect_app/src/main/res/drawable-mdpi/ic_folder.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xhdpi/ic_back.png b/collect_app/src/main/res/drawable-xhdpi/ic_back.png deleted file mode 100644 index 51ab5eecdf3..00000000000 Binary files a/collect_app/src/main/res/drawable-xhdpi/ic_back.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xhdpi/ic_download.png b/collect_app/src/main/res/drawable-xhdpi/ic_download.png deleted file mode 100644 index ce97c85dfa3..00000000000 Binary files a/collect_app/src/main/res/drawable-xhdpi/ic_download.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xhdpi/ic_folder.png b/collect_app/src/main/res/drawable-xhdpi/ic_folder.png deleted file mode 100644 index 5c4360af8a4..00000000000 Binary files a/collect_app/src/main/res/drawable-xhdpi/ic_folder.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xxhdpi/ic_back.png b/collect_app/src/main/res/drawable-xxhdpi/ic_back.png deleted file mode 100644 index b85c5aa82b2..00000000000 Binary files a/collect_app/src/main/res/drawable-xxhdpi/ic_back.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xxhdpi/ic_download.png b/collect_app/src/main/res/drawable-xxhdpi/ic_download.png deleted file mode 100644 index 8cb7410e403..00000000000 Binary files a/collect_app/src/main/res/drawable-xxhdpi/ic_download.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xxhdpi/ic_folder.png b/collect_app/src/main/res/drawable-xxhdpi/ic_folder.png deleted file mode 100644 index 1f075d01a44..00000000000 Binary files a/collect_app/src/main/res/drawable-xxhdpi/ic_folder.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xxxhdpi/ic_back.png b/collect_app/src/main/res/drawable-xxxhdpi/ic_back.png deleted file mode 100644 index a49c20c1d59..00000000000 Binary files a/collect_app/src/main/res/drawable-xxxhdpi/ic_back.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xxxhdpi/ic_download.png b/collect_app/src/main/res/drawable-xxxhdpi/ic_download.png deleted file mode 100644 index 7024677f63b..00000000000 Binary files a/collect_app/src/main/res/drawable-xxxhdpi/ic_download.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable-xxxhdpi/ic_folder.png b/collect_app/src/main/res/drawable-xxxhdpi/ic_folder.png deleted file mode 100644 index c7a13b4b338..00000000000 Binary files a/collect_app/src/main/res/drawable-xxxhdpi/ic_folder.png and /dev/null differ diff --git a/collect_app/src/main/res/drawable/ic_file_download.xml b/collect_app/src/main/res/drawable/ic_file_download.xml new file mode 100644 index 00000000000..25f59e1816e --- /dev/null +++ b/collect_app/src/main/res/drawable/ic_file_download.xml @@ -0,0 +1,4 @@ + + + diff --git a/collect_app/src/main/res/drawable/ic_folder.xml b/collect_app/src/main/res/drawable/ic_folder.xml new file mode 100644 index 00000000000..43146063c46 --- /dev/null +++ b/collect_app/src/main/res/drawable/ic_folder.xml @@ -0,0 +1,4 @@ + + +