From 91c7fc64bdfe16c3d72bc29a7920408097084c3b Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sun, 17 Sep 2023 08:37:07 -0300 Subject: [PATCH] refactor(PreviewlessMediaItems): remove unused class --- ...PreviewlessMediaGridStatusDisplayItem.java | 29 ----- .../ui/views/PreviewlessMediaGridLayout.java | 101 ------------------ 2 files changed, 130 deletions(-) delete mode 100644 mastodon/src/main/java/org/joinmastodon/android/ui/views/PreviewlessMediaGridLayout.java diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java index 5b9281071..6ff73e2d2 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java @@ -1,53 +1,24 @@ package org.joinmastodon.android.ui.displayitems; -import static org.joinmastodon.android.GlobalUserPreferences.*; - -import android.animation.Animator; -import android.animation.AnimatorListenerAdapter; -import android.animation.AnimatorSet; -import android.animation.ObjectAnimator; import android.app.Activity; -import android.graphics.Rect; -import android.graphics.drawable.ColorDrawable; -import android.graphics.drawable.Drawable; -import android.graphics.drawable.LayerDrawable; -import android.text.Layout; -import android.text.TextUtils; -import android.view.Gravity; import android.view.View; import android.view.ViewGroup; -import android.view.ViewPropertyAnimator; -import android.view.ViewTreeObserver; import android.widget.FrameLayout; -import android.widget.ImageButton; -import android.widget.ImageView; import android.widget.LinearLayout; -import android.widget.TextView; -import org.joinmastodon.android.R; import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.model.Attachment; import org.joinmastodon.android.model.Status; import org.joinmastodon.android.ui.OutlineProviders; import org.joinmastodon.android.ui.PhotoLayoutHelper; -import org.joinmastodon.android.ui.drawables.SpoilerStripesDrawable; -import org.joinmastodon.android.ui.photoviewer.PhotoViewerHost; -import org.joinmastodon.android.ui.utils.MediaAttachmentViewController; import org.joinmastodon.android.ui.utils.PreviewlessMediaAttachmentViewController; -import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.ui.views.FrameLayoutThatOnlyMeasuresFirstChild; -import org.joinmastodon.android.ui.views.MaxWidthFrameLayout; -import org.joinmastodon.android.ui.views.MediaGridLayout; -import org.joinmastodon.android.ui.views.PreviewlessMediaGridLayout; import org.joinmastodon.android.utils.TypedObjectPool; import java.util.ArrayList; import java.util.List; -import me.grishka.appkit.imageloader.ImageLoaderViewHolder; import me.grishka.appkit.imageloader.requests.ImageLoaderRequest; -import me.grishka.appkit.imageloader.requests.UrlImageLoaderRequest; -import me.grishka.appkit.utils.CubicBezierInterpolator; import me.grishka.appkit.utils.V; public class PreviewlessMediaGridStatusDisplayItem extends StatusDisplayItem{ diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/views/PreviewlessMediaGridLayout.java b/mastodon/src/main/java/org/joinmastodon/android/ui/views/PreviewlessMediaGridLayout.java deleted file mode 100644 index f81818989..000000000 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/views/PreviewlessMediaGridLayout.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.joinmastodon.android.ui.views; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; -import android.view.ViewGroup; -import android.widget.LinearLayout; - -import org.joinmastodon.android.ui.PhotoLayoutHelper; -import org.joinmastodon.android.ui.utils.UiUtils; - -import me.grishka.appkit.utils.V; - -public class PreviewlessMediaGridLayout extends LinearLayout{ - private static final String TAG="PreviewlessMediaGridLayout"; - - private static final int GAP=2; // dp - private PhotoLayoutHelper.TiledLayoutResult tiledLayout; - - public PreviewlessMediaGridLayout(Context context){ - this(context, null); - } - - public PreviewlessMediaGridLayout(Context context, AttributeSet attrs){ - this(context, attrs, 0); - } - - public PreviewlessMediaGridLayout(Context context, AttributeSet attrs, int defStyle){ - super(context, attrs, defStyle); - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){ -// if(tiledLayout==null){ -// setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), 0); -// return; -// } -// int width=Math.min(UiUtils.MAX_WIDTH, MeasureSpec.getSize(widthMeasureSpec)); -// int height=Math.round(width*(tiledLayout.height/(float)PhotoLayoutHelper.MAX_WIDTH)); -// if(tiledLayout.widthmaxWidth){ - xOffset=(r-l)/2-maxWidth/2; - } - - for(int i=0;i