From 92a418c0d1b61aa35ee8090504151c4e857d957f Mon Sep 17 00:00:00 2001 From: smhdk Date: Mon, 26 Nov 2018 13:20:34 +0300 Subject: [PATCH] - Bug fixed --- .../com/kodmap/app/library/adapter/PopupThumbAdapter.kt | 6 +----- library/src/main/res/layout/item_slider.xml | 1 + library/src/main/res/layout/item_thumb.xml | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/library/src/main/java/com/kodmap/app/library/adapter/PopupThumbAdapter.kt b/library/src/main/java/com/kodmap/app/library/adapter/PopupThumbAdapter.kt index d211430..947e47b 100644 --- a/library/src/main/java/com/kodmap/app/library/adapter/PopupThumbAdapter.kt +++ b/library/src/main/java/com/kodmap/app/library/adapter/PopupThumbAdapter.kt @@ -3,23 +3,19 @@ package com.kodmap.app.library.adapter import android.graphics.Bitmap import android.graphics.drawable.Drawable import android.os.Bundle -import android.support.v4.content.ContextCompat import android.support.v7.recyclerview.extensions.ListAdapter import android.support.v7.util.DiffUtil import android.support.v7.widget.RecyclerView import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.ImageView import com.kodmap.app.library.R import com.kodmap.app.library.listener.AdapterClickListener import com.kodmap.app.library.model.BaseItem import com.kodmap.app.library.ui.KmImageView import com.kodmap.app.library.ui.KmRelativeLayout -import com.squareup.picasso.Callback import com.squareup.picasso.Picasso import com.squareup.picasso.Target -import java.lang.Exception import java.util.* class PopupThumbAdapter(private val listener: AdapterClickListener) : ListAdapter(itemCallback) { @@ -36,7 +32,7 @@ class PopupThumbAdapter(private val listener: AdapterClickListener) : ListAdapte override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { val itemView = LayoutInflater.from(parent.context) - .inflate(R.layout.item_thumb, parent, false) as View + .inflate(R.layout.item_thumb, parent, false) return ViewHolder(itemView, listener) } diff --git a/library/src/main/res/layout/item_slider.xml b/library/src/main/res/layout/item_slider.xml index dad925f..6d7e66a 100644 --- a/library/src/main/res/layout/item_slider.xml +++ b/library/src/main/res/layout/item_slider.xml @@ -7,5 +7,6 @@ android:id="@+id/iv_item" android:layout_width="match_parent" android:layout_height="match_parent" + android:adjustViewBounds="true" android:layout_centerInParent="true" /> \ No newline at end of file diff --git a/library/src/main/res/layout/item_thumb.xml b/library/src/main/res/layout/item_thumb.xml index 2361ae0..28e9662 100644 --- a/library/src/main/res/layout/item_thumb.xml +++ b/library/src/main/res/layout/item_thumb.xml @@ -7,6 +7,7 @@ android:id="@+id/iv_thumb" android:layout_width="50dp" android:layout_height="50dp" + android:adjustViewBounds="true" android:scaleType="fitXY" />