diff --git a/app/src/main/java/org/schabi/newpipe/RouterActivity.java b/app/src/main/java/org/schabi/newpipe/RouterActivity.java index 22e84e93d..8f92f104d 100644 --- a/app/src/main/java/org/schabi/newpipe/RouterActivity.java +++ b/app/src/main/java/org/schabi/newpipe/RouterActivity.java @@ -29,7 +29,6 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.content.res.AppCompatResources; import androidx.core.app.NotificationCompat; import androidx.core.app.ServiceCompat; -import androidx.core.widget.TextViewCompat; import androidx.fragment.app.FragmentManager; import androidx.preference.PreferenceManager; @@ -388,7 +387,7 @@ public class RouterActivity extends AppCompatActivity { for (final AdapterChoiceItem item : choices) { final RadioButton radioButton = ListRadioIconItemBinding.inflate(inflater).getRoot(); radioButton.setText(item.description); - TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(radioButton, + radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds( AppCompatResources.getDrawable(themeWrapperContext, item.icon), null, null, null); radioButton.setChecked(false); diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 30c62af39..583da4764 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -88,6 +88,7 @@ import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; +import android.view.GestureDetector; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; @@ -118,7 +119,6 @@ import androidx.appcompat.widget.PopupMenu; import androidx.collection.ArraySet; import androidx.core.content.ContextCompat; import androidx.core.graphics.Insets; -import androidx.core.view.GestureDetectorCompat; import androidx.core.view.ViewCompat; import androidx.core.view.WindowInsetsCompat; import androidx.fragment.app.FragmentManager; @@ -387,7 +387,7 @@ public final class Player implements private static final float MAX_GESTURE_LENGTH = 0.75f; private int maxGestureLength; // scaled - private GestureDetectorCompat gestureDetector; + private GestureDetector gestureDetector; private PlayerGestureListener playerGestureListener; /*////////////////////////////////////////////////////////////////////////// @@ -555,7 +555,7 @@ public final class Player implements binding.playbackLiveSync.setOnClickListener(this); playerGestureListener = new PlayerGestureListener(this, service); - gestureDetector = new GestureDetectorCompat(context, playerGestureListener); + gestureDetector = new GestureDetector(context, playerGestureListener); binding.getRoot().setOnTouchListener(playerGestureListener); binding.queueButton.setOnClickListener(v -> onQueueClicked()); @@ -4428,7 +4428,7 @@ public final class Player implements return audioReactor; } - public GestureDetectorCompat getGestureDetector() { + public GestureDetector getGestureDetector() { return gestureDetector; } diff --git a/app/src/main/java/org/schabi/newpipe/settings/custom/NotificationActionsPreference.java b/app/src/main/java/org/schabi/newpipe/settings/custom/NotificationActionsPreference.java index 62455d682..7f7cfe209 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/custom/NotificationActionsPreference.java +++ b/app/src/main/java/org/schabi/newpipe/settings/custom/NotificationActionsPreference.java @@ -21,7 +21,6 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.content.res.AppCompatResources; import androidx.core.graphics.drawable.DrawableCompat; -import androidx.core.widget.TextViewCompat; import androidx.preference.Preference; import androidx.preference.PreferenceViewHolder; @@ -220,8 +219,8 @@ public class NotificationActionsPreference extends Preference { android.R.attr.textColorPrimary); drawable = DrawableCompat.wrap(drawable).mutate(); DrawableCompat.setTint(drawable, color); - TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(radioButton, - null, null, drawable, null); + radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds(null, + null, drawable, null); } } diff --git a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java index 39bdefbe0..961c45bc5 100644 --- a/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java +++ b/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java @@ -29,7 +29,6 @@ import androidx.appcompat.app.AlertDialog; import androidx.core.app.NotificationCompat; import androidx.core.content.ContextCompat; import androidx.core.content.FileProvider; -import androidx.core.view.ViewCompat; import androidx.recyclerview.widget.DiffUtil; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView.Adapter; @@ -871,7 +870,7 @@ public class MissionAdapter extends Adapter implements Handler.Callb super(view); progress = new ProgressDrawable(); - ViewCompat.setBackground(itemView.findViewById(R.id.item_bkg), progress); + itemView.findViewById(R.id.item_bkg).setBackground(progress); status = itemView.findViewById(R.id.item_status); name = itemView.findViewById(R.id.item_name);