summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorMartin Fietz <martin.fietz@gmail.com>2018-01-10 21:45:06 +0100
committerMartin Fietz <martin.fietz@gmail.com>2018-01-10 21:45:06 +0100
commit14718a9f516d7fdb0944755e9a8a25e4a2ccecf6 (patch)
treea200d92e5a8d8128a44b5225014fc18661ec7f07 /app/src
parent2c9582c947a4dcac567048e0445d83576fd22839 (diff)
downloadAntennaPod-14718a9f516d7fdb0944755e9a8a25e4a2ccecf6.zip
Custom views extend AppCompatImageView instead of ImageView
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/SquareImageView.java3
-rw-r--r--app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java5
2 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/view/SquareImageView.java b/app/src/main/java/de/danoeh/antennapod/view/SquareImageView.java
index 27b6ee2bc..11b873fdb 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/SquareImageView.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/SquareImageView.java
@@ -1,13 +1,14 @@
package de.danoeh.antennapod.view;
import android.content.Context;
+import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import android.widget.ImageView;
/**
* From http://stackoverflow.com/a/19449488/6839
*/
-public class SquareImageView extends ImageView {
+public class SquareImageView extends AppCompatImageView {
public SquareImageView(Context context) {
super(context);
diff --git a/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java b/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java
index 7b07d3f84..d2be4bb6a 100644
--- a/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java
+++ b/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java
@@ -20,6 +20,7 @@ import android.support.v4.view.accessibility.AccessibilityEventCompat;
import android.support.v7.app.MediaRouteControllerDialog;
import android.support.v7.graphics.Palette;
import android.support.v7.media.MediaRouter;
+import android.support.v7.widget.AppCompatImageView;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
@@ -203,7 +204,7 @@ public class CustomMRControllerDialog extends MediaRouteControllerDialog {
* http://stackoverflow.com/questions/18077325/scale-image-to-fill-imageview-width-and-keep-aspect-ratio
*/
if (landscape) {
- artView = new ImageView(getContext()) {
+ artView = new AppCompatImageView(getContext()) {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int desiredWidth = widthMeasureSpec;
@@ -234,7 +235,7 @@ public class CustomMRControllerDialog extends MediaRouteControllerDialog {
MarginLayoutParamsCompat.setMarginStart(artParams,
getContext().getResources().getDimensionPixelSize(R.dimen.media_router_controller_playback_control_horizontal_spacing));
} else {
- artView = new ImageView(getContext()) {
+ artView = new AppCompatImageView(getContext()) {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int desiredHeight = heightMeasureSpec;