diff --git a/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java b/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java index 6126da209..2677804af 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java +++ b/app/src/main/java/com/simplemobiletools/gallery/adapters/MediaAdapter.java @@ -26,16 +26,21 @@ public class MediaAdapter extends BaseAdapter { @Override public View getView(int position, View view, ViewGroup parent) { + final Media medium = media.get(position); ViewHolder holder; if (view == null) { - view = inflater.inflate(R.layout.medium_item, parent, false); + int layout = R.layout.photo_item; + if (medium.getIsVideo()) { + layout = R.layout.video_item; + } + view = inflater.inflate(layout, parent, false); holder = new ViewHolder(view); view.setTag(holder); } else { holder = (ViewHolder) view.getTag(); } - final String path = media.get(position).getPath(); + final String path = medium.getPath(); Glide.with(context).load(path).placeholder(R.color.tmb_background).centerCrop().crossFade().into(holder.photoThumbnail); return view; diff --git a/app/src/main/res/layout/medium_item.xml b/app/src/main/res/layout/photo_item.xml similarity index 91% rename from app/src/main/res/layout/medium_item.xml rename to app/src/main/res/layout/photo_item.xml index 3f4b67b5c..d18d298a4 100644 --- a/app/src/main/res/layout/medium_item.xml +++ b/app/src/main/res/layout/photo_item.xml @@ -1,5 +1,6 @@ + + + + + + + diff --git a/app/src/main/res/mipmap-hdpi/play_outline.png b/app/src/main/res/mipmap-hdpi/play_outline.png new file mode 100644 index 000000000..6e1b578c5 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/play_outline.png differ diff --git a/app/src/main/res/mipmap-mdpi/play_outline.png b/app/src/main/res/mipmap-mdpi/play_outline.png new file mode 100644 index 000000000..615b80d08 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/play_outline.png differ diff --git a/app/src/main/res/mipmap-xhdpi/play_outline.png b/app/src/main/res/mipmap-xhdpi/play_outline.png new file mode 100644 index 000000000..516f64326 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/play_outline.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/play_outline.png b/app/src/main/res/mipmap-xxhdpi/play_outline.png new file mode 100644 index 000000000..0311f899d Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/play_outline.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/play_outline.png b/app/src/main/res/mipmap-xxxhdpi/play_outline.png new file mode 100644 index 000000000..7a5a16858 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/play_outline.png differ diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 58495b016..986f5b7ac 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -2,5 +2,6 @@ 16dp 150dp 100dp + 40dp 8dp