From 9a6aba80ea258d08ba2dece3c76048f57dcf6184 Mon Sep 17 00:00:00 2001 From: sfsheng0322 Date: Fri, 10 Feb 2017 15:14:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E8=A3=85Glide=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/BaseListAdapter.java | 4 - .../adapter/HeaderChannelAdapter.java | 9 +- .../adapter/HeaderOperationAdapter.java | 9 +- .../adapter/TravelingAdapter.java | 8 +- .../manager/ImageManager.java | 92 -------------- .../GlideCircleTransform.java | 2 +- .../view/GildeImageView/GlideImageLoader.java | 116 ++++++++++++++++++ .../view/GildeImageView/GlideImageView.java | 63 ++++++++++ .../view/GildeImageView/GlideManager.java | 37 ++++++ .../view/GlideRoundTransform.java | 56 --------- .../view/HeaderBannerView.java | 8 +- app/src/main/res/layout/item_channel.xml | 6 +- app/src/main/res/layout/item_operation.xml | 8 +- app/src/main/res/layout/item_travel.xml | 10 +- 14 files changed, 246 insertions(+), 182 deletions(-) delete mode 100644 app/src/main/java/com/sunfusheng/StickyHeaderListView/manager/ImageManager.java rename app/src/main/java/com/sunfusheng/StickyHeaderListView/view/{ => GildeImageView}/GlideCircleTransform.java (96%) create mode 100644 app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageLoader.java create mode 100644 app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageView.java create mode 100644 app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideManager.java delete mode 100644 app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GlideRoundTransform.java diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/BaseListAdapter.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/BaseListAdapter.java index ac6c4b8..ed04f20 100644 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/BaseListAdapter.java +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/BaseListAdapter.java @@ -4,8 +4,6 @@ import android.view.LayoutInflater; import android.widget.BaseAdapter; -import com.sunfusheng.StickyHeaderListView.manager.ImageManager; - import java.util.ArrayList; import java.util.List; @@ -14,12 +12,10 @@ public abstract class BaseListAdapter extends BaseAdapter { private List mList = new ArrayList(); protected Context mContext; protected LayoutInflater mInflater; - protected ImageManager mImageManager; public BaseListAdapter(Context context) { mContext = context; mInflater = LayoutInflater.from(context); - mImageManager = new ImageManager(context); } public BaseListAdapter(Context context, List list) { diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderChannelAdapter.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderChannelAdapter.java index 15cd560..6f58228 100644 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderChannelAdapter.java +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderChannelAdapter.java @@ -4,11 +4,11 @@ import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; -import android.widget.ImageView; import android.widget.TextView; import com.sunfusheng.StickyHeaderListView.R; import com.sunfusheng.StickyHeaderListView.model.ChannelEntity; +import com.sunfusheng.StickyHeaderListView.view.GildeImageView.GlideImageView; import java.util.List; @@ -38,7 +38,8 @@ public View getView(int position, View convertView, ViewGroup parent) { ChannelEntity entity = getItem(position); holder.tvTitle.setText(entity.getTitle()); - mImageManager.loadCircleImage(entity.getImage_url(), holder.ivImage); + holder.givImage.loadNetCircleImage(entity.getImage_url(), R.color.font_black_6); + if (TextUtils.isEmpty(entity.getTips())) { holder.tvTips.setVisibility(View.INVISIBLE); } else { @@ -50,8 +51,8 @@ public View getView(int position, View convertView, ViewGroup parent) { } static class ViewHolder { - @BindView(R.id.iv_image) - ImageView ivImage; + @BindView(R.id.giv_image) + GlideImageView givImage; @BindView(R.id.tv_title) TextView tvTitle; @BindView(R.id.tv_tips) diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderOperationAdapter.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderOperationAdapter.java index 20f041c..2e9e8e9 100644 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderOperationAdapter.java +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/HeaderOperationAdapter.java @@ -4,11 +4,11 @@ import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; -import android.widget.ImageView; import android.widget.TextView; import com.sunfusheng.StickyHeaderListView.R; import com.sunfusheng.StickyHeaderListView.model.OperationEntity; +import com.sunfusheng.StickyHeaderListView.view.GildeImageView.GlideImageView; import java.util.List; @@ -42,7 +42,8 @@ public View getView(int position, View convertView, ViewGroup parent) { OperationEntity entity = getItem(position); holder.tvTitle.setText(entity.getTitle()); - mImageManager.loadUrlImage(entity.getImage_url(), holder.ivImage); + holder.givImage.loadNetImage(entity.getImage_url(), R.color.font_black_6); + if (TextUtils.isEmpty(entity.getSubtitle())) { holder.tvSubtitle.setVisibility(View.INVISIBLE); } else { @@ -54,8 +55,8 @@ public View getView(int position, View convertView, ViewGroup parent) { } static class ViewHolder { - @BindView(R.id.iv_image) - ImageView ivImage; + @BindView(R.id.giv_image) + GlideImageView givImage; @BindView(R.id.tv_title) TextView tvTitle; @BindView(R.id.tv_subtitle) diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/TravelingAdapter.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/TravelingAdapter.java index 8dca6e4..6ab1b13 100644 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/TravelingAdapter.java +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/adapter/TravelingAdapter.java @@ -5,7 +5,6 @@ import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; -import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; @@ -13,6 +12,7 @@ import com.sunfusheng.StickyHeaderListView.R; import com.sunfusheng.StickyHeaderListView.model.TravelingEntity; import com.sunfusheng.StickyHeaderListView.util.ToastUtil; +import com.sunfusheng.StickyHeaderListView.view.GildeImageView.GlideImageView; import java.util.ArrayList; import java.util.List; @@ -99,7 +99,7 @@ public View getView(int position, View convertView, ViewGroup parent) { final String title = entity.getFrom() + entity.getTitle() + entity.getType(); holder.tvTitle.setText(title); holder.tvRank.setText("排名:" + entity.getRank()); - mImageManager.loadUrlImage(entity.getImage_url(), holder.ivImage); + holder.givImage.loadNetImage(entity.getImage_url(), R.color.font_black_6); convertView.setOnClickListener(new View.OnClickListener() { @Override @@ -114,8 +114,8 @@ public void onClick(View v) { static class ViewHolder { @BindView(R.id.ll_root_view) LinearLayout llRootView; - @BindView(R.id.iv_image) - ImageView ivImage; + @BindView(R.id.giv_image) + GlideImageView givImage; @BindView(R.id.tv_title) TextView tvTitle; @BindView(R.id.tv_rank) diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/manager/ImageManager.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/manager/ImageManager.java deleted file mode 100644 index abd1e93..0000000 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/manager/ImageManager.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.sunfusheng.StickyHeaderListView.manager; - -import android.content.Context; -import android.net.Uri; -import android.widget.ImageView; - -import com.bumptech.glide.Glide; -import com.sunfusheng.StickyHeaderListView.R; -import com.sunfusheng.StickyHeaderListView.view.GlideCircleTransform; - -/** - * Created by sunfusheng on 16/4/6. - */ -public class ImageManager { - - private Context mContext; - public static final String ANDROID_RESOURCE = "android.resource://"; - public static final String SEPARATOR = "/"; - - public ImageManager(Context context) { - this.mContext = context; - } - - // 将资源ID转为Uri - public Uri resourceIdToUri(int resourceId) { - return Uri.parse(ANDROID_RESOURCE + mContext.getPackageName() + SEPARATOR + resourceId); - } - - // 加载网络图片 - public void loadUrlImage(String url, ImageView imageView) { - Glide.with(mContext) - .load(url) - .placeholder(R.color.font_black_6) - .error(R.color.font_black_6) - .crossFade() - .into(imageView); - } - - // 加载drawable图片 - public void loadResImage(int resId, ImageView imageView) { - Glide.with(mContext) - .load(resourceIdToUri(resId)) - .placeholder(R.color.font_black_6) - .error(R.color.font_black_6) - .crossFade() - .into(imageView); - } - - // 加载本地图片 - public void loadLocalImage(String path, ImageView imageView) { - Glide.with(mContext) - .load("file://" + path) - .placeholder(R.color.font_black_6) - .error(R.color.font_black_6) - .crossFade() - .into(imageView); - } - - // 加载网络圆型图片 - public void loadCircleImage(String url, ImageView imageView) { - Glide.with(mContext) - .load(url) - .placeholder(R.mipmap.ic_launcher) - .error(R.mipmap.ic_launcher) - .crossFade() - .transform(new GlideCircleTransform(mContext)) - .into(imageView); - } - - // 加载drawable圆型图片 - public void loadCircleResImage(int resId, ImageView imageView) { - Glide.with(mContext) - .load(resourceIdToUri(resId)) - .placeholder(R.color.font_black_6) - .error(R.color.font_black_6) - .crossFade() - .transform(new GlideCircleTransform(mContext)) - .into(imageView); - } - - // 加载本地圆型图片 - public void loadCircleLocalImage(String path, ImageView imageView) { - Glide.with(mContext) - .load("file://" + path) - .placeholder(R.color.font_black_6) - .error(R.color.font_black_6) - .crossFade() - .transform(new GlideCircleTransform(mContext)) - .into(imageView); - } - -} diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GlideCircleTransform.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideCircleTransform.java similarity index 96% rename from app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GlideCircleTransform.java rename to app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideCircleTransform.java index efd9e5f..c9fb7c1 100644 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GlideCircleTransform.java +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideCircleTransform.java @@ -1,4 +1,4 @@ -package com.sunfusheng.StickyHeaderListView.view; +package com.sunfusheng.StickyHeaderListView.view.GildeImageView; import android.content.Context; import android.graphics.Bitmap; diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageLoader.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageLoader.java new file mode 100644 index 0000000..46f980e --- /dev/null +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageLoader.java @@ -0,0 +1,116 @@ +package com.sunfusheng.StickyHeaderListView.view.GildeImageView; + +import android.net.Uri; +import android.support.annotation.IdRes; +import android.text.TextUtils; +import android.widget.ImageView; + +import com.bumptech.glide.DrawableRequestBuilder; +import com.bumptech.glide.Glide; +import com.bumptech.glide.load.engine.DiskCacheStrategy; +import com.bumptech.glide.load.resource.drawable.GlideDrawable; +import com.bumptech.glide.request.RequestListener; +import com.bumptech.glide.request.target.Target; + +/** + * Created by sunfusheng on 2017/1/23. + */ +public class GlideImageLoader { + + public static final String ANDROID_RESOURCE = "android.resource://"; + public static final String SEPARATOR = "/"; + private ImageView mImageView; + + public GlideImageLoader(ImageView view) { + mImageView = view; + } + + // 将资源ID转为Uri + public Uri resIdToUri(int resourceId) { + return Uri.parse(ANDROID_RESOURCE + mImageView.getContext().getPackageName() + SEPARATOR + resourceId); + } + + // 加载网络图片 + public void loadNetImage(String url, int holderResId) { + urlBuilder(url, holderResId).into(mImageView); + } + + // 加载drawable图片 + public void loadResImage(@IdRes int resId, int holderResId) { + resBuilder(resId, holderResId).into(mImageView); + } + + // 加载本地图片 + public void loadLocalPathImage(String path, int holderResId) { + urlBuilder("file://" + path, holderResId).into(mImageView); + } + + // 加载网络圆型图片 + public void loadNetCircleImage(String url, int holderResId) { + urlBuilder(url, holderResId) + .transform(new GlideCircleTransform(mImageView.getContext())) + .into(mImageView); + } + + // 加载drawable圆型图片 + public void loadLocalResCircleImage(int resId, int holderResId) { + resBuilder(resId, holderResId) + .transform(new GlideCircleTransform(mImageView.getContext())) + .into(mImageView); + } + + // 加载本地圆型图片 + public void loadLocalPathCircleImage(String path, int holderResId) { + urlBuilder("file://" + path, holderResId) + .transform(new GlideCircleTransform(mImageView.getContext())) + .into(mImageView); + } + + // 创建 Res DrawableRequestBuilder + public DrawableRequestBuilder resBuilder(int resId, int holderResId) { + return uriBuilder(resIdToUri(resId), holderResId); + } + + // 创建 Uri DrawableRequestBuilder + public DrawableRequestBuilder uriBuilder(Uri uri, int holderResId) { + return Glide.with(mImageView.getContext()) + .load(uri) + .crossFade() + .dontAnimate() + .fallback(holderResId) + .error(holderResId) + .diskCacheStrategy(DiskCacheStrategy.SOURCE); + } + + // 创建 Url DrawableRequestBuilder + public DrawableRequestBuilder urlBuilder(final String url, int holderResId) { + if (GlideManager.getInstance().isRequestFailedUrl(url)) { + return resBuilder(holderResId, holderResId); + } + return Glide.with(mImageView.getContext()) + .load(url) + .crossFade() + .dontAnimate() + .fallback(holderResId) + .error(holderResId) + .diskCacheStrategy(DiskCacheStrategy.SOURCE) + .listener(new RequestListener() { + @Override + public boolean onException(Exception e, String model, Target target, boolean isFirstResource) { + GlideManager.getInstance().putRequestFailedUrl(url); + return false; + } + + @Override + public boolean onResourceReady(GlideDrawable resource, String model, Target target, boolean isFromMemoryCache, boolean isFirstResource) { + return false; + } + }); + } + + public boolean isGif(String url) { + if (TextUtils.isEmpty(url)) return false; + if (url.endsWith(".gif")) return true; + return false; + } +} diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageView.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageView.java new file mode 100644 index 0000000..09b8bff --- /dev/null +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideImageView.java @@ -0,0 +1,63 @@ +package com.sunfusheng.StickyHeaderListView.view.GildeImageView; + +import android.content.Context; +import android.support.annotation.IdRes; +import android.util.AttributeSet; + +/** + * Created by sunfusheng on 2017/1/22. + * + * 设置 placeholder 有坑 + */ +public class GlideImageView extends android.support.v7.widget.AppCompatImageView { + + private GlideImageLoader mLoader; + + public GlideImageView(Context context) { + this(context, null); + } + + public GlideImageView(Context context, AttributeSet attrs) { + this(context, attrs, 0); + } + + public GlideImageView(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + init(); + } + + private void init() { + mLoader = new GlideImageLoader(this); + } + + // 加载网络图片 + public void loadNetImage(String url, int holderResId) { + mLoader.loadNetImage(url, holderResId); + } + + // 加载drawable图片 + public void loadResImage(@IdRes int resId, int holderResId) { + mLoader.loadResImage(resId, holderResId); + } + + // 加载本地图片 + public void loadLocalPathImage(String path, int holderResId) { + mLoader.loadLocalPathImage(path, holderResId); + } + + // 加载网络圆型图片 + public void loadNetCircleImage(String url, int holderResId) { + mLoader.loadNetCircleImage(url, holderResId); + } + + // 加载drawable圆型图片 + public void loadLocalResCircleImage(int resId, int holderResId) { + mLoader.loadLocalResCircleImage(resId, holderResId); + } + + // 加载本地圆型图片 + public void loadLocalPathCircleImage(String path, int holderResId) { + mLoader.loadLocalPathCircleImage(path, holderResId); + } + +} diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideManager.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideManager.java new file mode 100644 index 0000000..6d7a053 --- /dev/null +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GildeImageView/GlideManager.java @@ -0,0 +1,37 @@ +package com.sunfusheng.StickyHeaderListView.view.GildeImageView; + +import android.text.TextUtils; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by sunfusheng on 2017/1/22. + */ +public class GlideManager { + + private static Map map = new HashMap<>(); + + private static GlideManager mInstance = new GlideManager(); + + private GlideManager() { + } + + public static GlideManager getInstance() { + return mInstance; + } + + public boolean isRequestFailedUrl(String url) { + if (TextUtils.isEmpty(url)) return true; + if (map.containsKey(url)) return true; + return false; + } + + public void putRequestFailedUrl(String url) { + int failedTimes = 1; + if (map.containsKey(url)) { + failedTimes = map.get(url); + } + map.put(url, failedTimes); + } +} diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GlideRoundTransform.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GlideRoundTransform.java deleted file mode 100644 index f144841..0000000 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/GlideRoundTransform.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.sunfusheng.StickyHeaderListView.view; - -import android.content.Context; -import android.content.res.Resources; -import android.graphics.Bitmap; -import android.graphics.BitmapShader; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.RectF; - -import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; -import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; - -/** - * Created by sunfusheng on 16/4/6. - */ -public class GlideRoundTransform extends BitmapTransformation { - - private static float radius = 0f; - - public GlideRoundTransform(Context context) { - this(context, 4); - } - - public GlideRoundTransform(Context context, int dp) { - super(context); - this.radius = Resources.getSystem().getDisplayMetrics().density * dp; - } - - @Override - protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { - return roundCrop(pool, toTransform); - } - - private static Bitmap roundCrop(BitmapPool pool, Bitmap source) { - if (source == null) return null; - - Bitmap result = pool.get(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); - if (result == null) { - result = Bitmap.createBitmap(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); - } - - Canvas canvas = new Canvas(result); - Paint paint = new Paint(); - paint.setShader(new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP)); - paint.setAntiAlias(true); - RectF rectF = new RectF(0f, 0f, source.getWidth(), source.getHeight()); - canvas.drawRoundRect(rectF, radius, radius, paint); - return result; - } - - @Override - public String getId() { - return getClass().getName() + Math.round(radius); - } -} diff --git a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/HeaderBannerView.java b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/HeaderBannerView.java index dbd5bae..ad41e6b 100644 --- a/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/HeaderBannerView.java +++ b/app/src/main/java/com/sunfusheng/StickyHeaderListView/view/HeaderBannerView.java @@ -15,8 +15,8 @@ import com.sunfusheng.StickyHeaderListView.R; import com.sunfusheng.StickyHeaderListView.adapter.HeaderBannerAdapter; -import com.sunfusheng.StickyHeaderListView.manager.ImageManager; import com.sunfusheng.StickyHeaderListView.util.DensityUtil; +import com.sunfusheng.StickyHeaderListView.view.GildeImageView.GlideImageView; import java.lang.reflect.Field; import java.util.ArrayList; @@ -37,7 +37,6 @@ public class HeaderBannerView extends HeaderViewInterface> { private static final int BANNER_TYPE = 0; private static final int BANNER_TIME = 5000; // ms private List ivList; - private ImageManager mImageManager; private int bannerHeight; private int bannerCount; @@ -55,7 +54,6 @@ public void handleMessage(Message msg) { public HeaderBannerView(Activity context) { super(context); ivList = new ArrayList<>(); - mImageManager = new ImageManager(context); bannerHeight = DensityUtil.getWindowWidth(context) * 9 / 16; } @@ -92,11 +90,11 @@ private void dealWithTheView(List list) { // 创建要显示的ImageView private ImageView createImageView(String url) { - ImageView imageView = new ImageView(mActivity); + GlideImageView imageView = new GlideImageView(mActivity); AbsListView.LayoutParams params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); imageView.setLayoutParams(params); + imageView.loadNetImage(url, R.color.font_black_6); imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); - mImageManager.loadUrlImage(url, imageView); return imageView; } diff --git a/app/src/main/res/layout/item_channel.xml b/app/src/main/res/layout/item_channel.xml index d3f78c4..8216031 100644 --- a/app/src/main/res/layout/item_channel.xml +++ b/app/src/main/res/layout/item_channel.xml @@ -7,8 +7,8 @@ android:gravity="center_vertical" android:minHeight="90dp"> - - diff --git a/app/src/main/res/layout/item_travel.xml b/app/src/main/res/layout/item_travel.xml index 2c1223d..6aced1e 100644 --- a/app/src/main/res/layout/item_travel.xml +++ b/app/src/main/res/layout/item_travel.xml @@ -13,8 +13,8 @@ android:background="@drawable/ripple_item_clicked" android:padding="10dp"> -