Remove no longer needed Compat stuff
This commit is contained in:
parent
90d6095dad
commit
cf4345564c
@ -98,7 +98,6 @@ dependencies {
|
|||||||
implementation "androidx.fragment:fragment:$fragmentVersion"
|
implementation "androidx.fragment:fragment:$fragmentVersion"
|
||||||
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
||||||
implementation "androidx.media:media:$mediaVersion"
|
implementation "androidx.media:media:$mediaVersion"
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
|
||||||
implementation "androidx.palette:palette:$paletteVersion"
|
implementation "androidx.palette:palette:$paletteVersion"
|
||||||
implementation "androidx.preference:preference:$preferenceVersion"
|
implementation "androidx.preference:preference:$preferenceVersion"
|
||||||
implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion"
|
implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion"
|
||||||
|
@ -5,7 +5,6 @@ import android.util.AttributeSet;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
@ -29,7 +28,7 @@ public class ViewPagerBottomSheetBehavior<V extends View> extends BottomSheetBeh
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
View findScrollingChild(View view) {
|
View findScrollingChild(View view) {
|
||||||
if (ViewCompat.isNestedScrollingEnabled(view)) {
|
if (view.isNestedScrollingEnabled()) {
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package de.danoeh.antennapod;
|
package de.danoeh.antennapod;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.StrictMode;
|
import android.os.StrictMode;
|
||||||
|
|
||||||
import androidx.multidex.MultiDexApplication;
|
|
||||||
import com.google.android.material.color.DynamicColors;
|
import com.google.android.material.color.DynamicColors;
|
||||||
import com.joanzapata.iconify.Iconify;
|
import com.joanzapata.iconify.Iconify;
|
||||||
import com.joanzapata.iconify.fonts.FontAwesomeModule;
|
import com.joanzapata.iconify.fonts.FontAwesomeModule;
|
||||||
@ -21,7 +21,7 @@ import de.danoeh.antennapod.spa.SPAUtil;
|
|||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
/** Main application class. */
|
/** Main application class. */
|
||||||
public class PodcastApp extends MultiDexApplication {
|
public class PodcastApp extends Application {
|
||||||
|
|
||||||
private static PodcastApp singleton;
|
private static PodcastApp singleton;
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package de.danoeh.antennapod.activity;
|
package de.danoeh.antennapod.activity;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.PixelFormat;
|
import android.graphics.PixelFormat;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
@ -20,6 +19,7 @@ import android.view.MenuItem;
|
|||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.SurfaceHolder;
|
import android.view.SurfaceHolder;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.AlphaAnimation;
|
import android.view.animation.AlphaAnimation;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
@ -30,7 +30,6 @@ import android.widget.EditText;
|
|||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.view.WindowCompat;
|
|
||||||
import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
|
import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
@ -95,13 +94,12 @@ public class VideoplayerActivity extends CastEnabledActivity implements SeekBar.
|
|||||||
private Disposable disposable;
|
private Disposable disposable;
|
||||||
private float prog;
|
private float prog;
|
||||||
|
|
||||||
@SuppressLint("AppCompatMethod")
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
|
||||||
// has to be called before setting layout content
|
// has to be called before setting layout content
|
||||||
supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY);
|
supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
|
||||||
setTheme(R.style.Theme_AntennaPod_VideoPlayer);
|
setTheme(R.style.Theme_AntennaPod_VideoPlayer);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
@ -156,12 +156,12 @@ public class SwipeActionsDialog {
|
|||||||
|
|
||||||
Drawable icon = DrawableCompat.wrap(AppCompatResources.getDrawable(context, action.getActionIcon()));
|
Drawable icon = DrawableCompat.wrap(AppCompatResources.getDrawable(context, action.getActionIcon()));
|
||||||
icon.mutate();
|
icon.mutate();
|
||||||
DrawableCompat.setTintMode(icon, PorterDuff.Mode.SRC_ATOP);
|
icon.setTintMode(PorterDuff.Mode.SRC_ATOP);
|
||||||
if ((direction == LEFT && leftAction == action) || (direction == RIGHT && rightAction == action)) {
|
if ((direction == LEFT && leftAction == action) || (direction == RIGHT && rightAction == action)) {
|
||||||
DrawableCompat.setTint(icon, ThemeUtils.getColorFromAttr(context, action.getActionColor()));
|
icon.setTint(ThemeUtils.getColorFromAttr(context, action.getActionColor()));
|
||||||
item.swipeActionLabel.setTextColor(ThemeUtils.getColorFromAttr(context, action.getActionColor()));
|
item.swipeActionLabel.setTextColor(ThemeUtils.getColorFromAttr(context, action.getActionColor()));
|
||||||
} else {
|
} else {
|
||||||
DrawableCompat.setTint(icon, ThemeUtils.getColorFromAttr(context, R.attr.action_icon_color));
|
icon.setTint(ThemeUtils.getColorFromAttr(context, R.attr.action_icon_color));
|
||||||
}
|
}
|
||||||
item.swipeIcon.setImageDrawable(icon);
|
item.swipeIcon.setImageDrawable(icon);
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.text.TextUtilsCompat;
|
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.DefaultItemAnimator;
|
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||||
import de.danoeh.antennapod.adapter.EpisodeItemListAdapter;
|
import de.danoeh.antennapod.adapter.EpisodeItemListAdapter;
|
||||||
@ -38,7 +36,7 @@ public abstract class HomeSection extends Fragment implements View.OnCreateConte
|
|||||||
@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
viewBinding = HomeSectionBinding.inflate(inflater);
|
viewBinding = HomeSectionBinding.inflate(inflater);
|
||||||
viewBinding.titleLabel.setText(getSectionTitle());
|
viewBinding.titleLabel.setText(getSectionTitle());
|
||||||
if (TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == ViewCompat.LAYOUT_DIRECTION_LTR) {
|
if (TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_LTR) {
|
||||||
viewBinding.moreButton.setText(getMoreLinkTitle() + "\u00A0»");
|
viewBinding.moreButton.setText(getMoreLinkTitle() + "\u00A0»");
|
||||||
} else {
|
} else {
|
||||||
viewBinding.moreButton.setText("«\u00A0" + getMoreLinkTitle());
|
viewBinding.moreButton.setText("«\u00A0" + getMoreLinkTitle());
|
||||||
|
@ -3,7 +3,6 @@ package de.danoeh.antennapod.view;
|
|||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
@ -18,7 +17,7 @@ public class LiftOnScrollListener extends RecyclerView.OnScrollListener
|
|||||||
|
|
||||||
public LiftOnScrollListener(View appBar) {
|
public LiftOnScrollListener(View appBar) {
|
||||||
animator = ValueAnimator.ofFloat(0, appBar.getContext().getResources().getDisplayMetrics().density * 8);
|
animator = ValueAnimator.ofFloat(0, appBar.getContext().getResources().getDisplayMetrics().density * 8);
|
||||||
animator.addUpdateListener(animation -> ViewCompat.setElevation(appBar, (float) animation.getAnimatedValue()));
|
animator.addUpdateListener(animation -> appBar.setElevation((float) animation.getAnimatedValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -19,7 +19,6 @@ import android.webkit.WebViewClient;
|
|||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.util.Consumer;
|
import androidx.core.util.Consumer;
|
||||||
import androidx.core.view.ViewCompat;
|
|
||||||
|
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
|
||||||
@ -133,7 +132,7 @@ public class ShownotesWebView extends WebView implements View.OnLongClickListene
|
|||||||
cm.setPrimaryClip(clipData);
|
cm.setPrimaryClip(clipData);
|
||||||
if (Build.VERSION.SDK_INT < 32) {
|
if (Build.VERSION.SDK_INT < 32) {
|
||||||
Snackbar s = Snackbar.make(this, R.string.copied_to_clipboard, Snackbar.LENGTH_LONG);
|
Snackbar s = Snackbar.make(this, R.string.copied_to_clipboard, Snackbar.LENGTH_LONG);
|
||||||
ViewCompat.setElevation(s.getView(), 100);
|
s.getView().setElevation(100);
|
||||||
s.show();
|
s.show();
|
||||||
}
|
}
|
||||||
} else if (itemId == R.id.go_to_position_item) {
|
} else if (itemId == R.id.go_to_position_item) {
|
||||||
|
@ -5,7 +5,6 @@ android {
|
|||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
|
|
||||||
multiDexEnabled true
|
|
||||||
vectorDrawables.useSupportLibrary true
|
vectorDrawables.useSupportLibrary true
|
||||||
vectorDrawables.generatedDensities = []
|
vectorDrawables.generatedDensities = []
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ import android.support.v4.media.session.MediaSessionCompat;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import de.danoeh.antennapod.core.R;
|
import de.danoeh.antennapod.core.R;
|
||||||
@ -119,7 +119,7 @@ public class PlaybackServiceNotificationBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Bitmap getBitmap(Context context, int drawableId) {
|
private static Bitmap getBitmap(Context context, int drawableId) {
|
||||||
Drawable drawable = ContextCompat.getDrawable(context, drawableId);
|
Drawable drawable = AppCompatResources.getDrawable(context, drawableId);
|
||||||
if (drawable instanceof BitmapDrawable) {
|
if (drawable instanceof BitmapDrawable) {
|
||||||
return ((BitmapDrawable) drawable).getBitmap();
|
return ((BitmapDrawable) drawable).getBitmap();
|
||||||
} else if (drawable instanceof VectorDrawable) {
|
} else if (drawable instanceof VectorDrawable) {
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="@dimen/widget_margin"
|
android:padding="@dimen/widget_margin">
|
||||||
tools:ignore="VectorDrawableCompat">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/widgetLayout"
|
android:id="@+id/widgetLayout"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user