mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Fixed the error drawable of glide image loading has not been done rounded corners transformation.
This commit is contained in:
parent
9530e1f497
commit
acc08489fa
@ -199,7 +199,8 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (!mProfileImageUrl.equals("")) {
|
if (!mProfileImageUrl.equals("")) {
|
||||||
glide.load(mProfileImageUrl)
|
glide.load(mProfileImageUrl)
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(144, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(144, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(144, 0))))
|
||||||
.into(mProfileImageView);
|
.into(mProfileImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
@ -259,7 +260,8 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (!profileImageUrl.equals("")) {
|
if (!profileImageUrl.equals("")) {
|
||||||
glide.load(profileImageUrl)
|
glide.load(profileImageUrl)
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0))))
|
||||||
.into(mProfileImageView);
|
.into(mProfileImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -156,7 +156,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
|
|||||||
if(!iconImageUrl.equals("")) {
|
if(!iconImageUrl.equals("")) {
|
||||||
glide.load(iconImageUrl)
|
glide.load(iconImageUrl)
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
@ -172,7 +173,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
|
|||||||
} else if(!post.getSubredditIconUrl().equals("")) {
|
} else if(!post.getSubredditIconUrl().equals("")) {
|
||||||
glide.load(post.getSubredditIconUrl())
|
glide.load(post.getSubredditIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
@ -206,7 +208,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
|
|||||||
if(!iconImageUrl.equals("")) {
|
if(!iconImageUrl.equals("")) {
|
||||||
glide.load(iconImageUrl)
|
glide.load(iconImageUrl)
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
@ -222,7 +225,8 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo
|
|||||||
} else if(!post.getAuthorIconUrl().equals("")) {
|
} else if(!post.getAuthorIconUrl().equals("")) {
|
||||||
glide.load(post.getAuthorIconUrl())
|
glide.load(post.getAuthorIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
.into(((DataViewHolder) holder).subredditIconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -3,6 +3,7 @@ package ml.docilealligator.infinityforreddit;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -102,9 +103,11 @@ public class SubredditListingRecyclerViewAdapter extends PagedListAdapter<Subred
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(subredditData.getIconUrl() != null) {
|
if(subredditData.getIconUrl() != null) {
|
||||||
|
Log.i("url", subredditData.getIconUrl());
|
||||||
glide.load(subredditData.getIconUrl())
|
glide.load(subredditData.getIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((DataViewHolder) holder).iconGifImageView);
|
.into(((DataViewHolder) holder).iconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -2,8 +2,6 @@ package ml.docilealligator.infinityforreddit;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -16,6 +14,8 @@ import com.bumptech.glide.request.RequestOptions;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import SubscribedSubredditDatabase.SubscribedSubredditData;
|
import SubscribedSubredditDatabase.SubscribedSubredditData;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
||||||
import pl.droidsonroids.gif.GifImageView;
|
import pl.droidsonroids.gif.GifImageView;
|
||||||
|
|
||||||
@ -54,7 +54,8 @@ class SubscribedSubredditRecyclerViewAdapter extends RecyclerView.Adapter<Recycl
|
|||||||
if(!mSubscribedSubredditData.get(i).getIconUrl().equals("")) {
|
if(!mSubscribedSubredditData.get(i).getIconUrl().equals("")) {
|
||||||
glide.load(mSubscribedSubredditData.get(i).getIconUrl())
|
glide.load(mSubscribedSubredditData.get(i).getIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((SubredditViewHolder) viewHolder).iconGifImageView);
|
.into(((SubredditViewHolder) viewHolder).iconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -2,8 +2,6 @@ package ml.docilealligator.infinityforreddit;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -16,6 +14,8 @@ import com.bumptech.glide.request.RequestOptions;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import SubscribedUserDatabase.SubscribedUserData;
|
import SubscribedUserDatabase.SubscribedUserData;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;
|
||||||
import pl.droidsonroids.gif.GifImageView;
|
import pl.droidsonroids.gif.GifImageView;
|
||||||
|
|
||||||
@ -52,7 +52,8 @@ public class SubscribedUserRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
|||||||
if(!mSubscribedUserData.get(i).getIconUrl().equals("")) {
|
if(!mSubscribedUserData.get(i).getIconUrl().equals("")) {
|
||||||
glide.load(mSubscribedUserData.get(i).getIconUrl())
|
glide.load(mSubscribedUserData.get(i).getIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((UserViewHolder) viewHolder).iconGifImageView);
|
.into(((UserViewHolder) viewHolder).iconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -104,7 +104,8 @@ public class UserListingRecyclerViewAdapter extends PagedListAdapter<UserData, R
|
|||||||
if(UserData.getIconUrl() != null) {
|
if(UserData.getIconUrl() != null) {
|
||||||
glide.load(UserData.getIconUrl())
|
glide.load(UserData.getIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(((UserListingRecyclerViewAdapter.DataViewHolder) holder).iconGifImageView);
|
.into(((UserListingRecyclerViewAdapter.DataViewHolder) holder).iconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -142,7 +142,8 @@ public class ViewPostDetailActivity extends AppCompatActivity {
|
|||||||
if(!iconImageUrl.equals("")) {
|
if(!iconImageUrl.equals("")) {
|
||||||
glide.load(iconImageUrl)
|
glide.load(iconImageUrl)
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(mSubredditIconGifImageView);
|
.into(mSubredditIconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
@ -156,7 +157,8 @@ public class ViewPostDetailActivity extends AppCompatActivity {
|
|||||||
} else if(!mPost.getSubredditIconUrl().equals("")) {
|
} else if(!mPost.getSubredditIconUrl().equals("")) {
|
||||||
glide.load(mPost.getSubredditIconUrl())
|
glide.load(mPost.getSubredditIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
|
||||||
.into(mSubredditIconGifImageView);
|
.into(mSubredditIconGifImageView);
|
||||||
} else {
|
} else {
|
||||||
glide.load(R.drawable.subreddit_default_icon)
|
glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
@ -159,7 +159,8 @@ public class ViewSubredditDetailActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
glide.load(subredditData.getIconUrl())
|
glide.load(subredditData.getIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(216, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(216, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(216, 0))))
|
||||||
.into(iconGifImageView);
|
.into(iconGifImageView);
|
||||||
iconGifImageView.setOnClickListener(view -> {
|
iconGifImageView.setOnClickListener(view -> {
|
||||||
Intent intent = new Intent(ViewSubredditDetailActivity.this, ViewImageActivity.class);
|
Intent intent = new Intent(ViewSubredditDetailActivity.this, ViewImageActivity.class);
|
||||||
|
@ -157,7 +157,8 @@ public class ViewUserDetailActivity extends AppCompatActivity {
|
|||||||
} else {
|
} else {
|
||||||
glide.load(userData.getIconUrl())
|
glide.load(userData.getIconUrl())
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(216, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(216, 0)))
|
||||||
.error(glide.load(R.drawable.subreddit_default_icon))
|
.error(glide.load(R.drawable.subreddit_default_icon)
|
||||||
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(216, 0))))
|
||||||
.into(iconGifImageView);
|
.into(iconGifImageView);
|
||||||
|
|
||||||
iconGifImageView.setOnClickListener(view -> {
|
iconGifImageView.setOnClickListener(view -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user