Use AppCompat
This commit is contained in:
parent
90dc14c7bc
commit
5d1889fd1d
|
@ -1,12 +1,12 @@
|
||||||
package net.nullsum.audinaut.view;
|
package net.nullsum.audinaut.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.support.v7.widget.AppCompatImageButton;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageButton;
|
|
||||||
|
|
||||||
public class AutoRepeatButton extends ImageButton {
|
public class AutoRepeatButton extends AppCompatImageButton {
|
||||||
|
|
||||||
private static final long initialRepeatDelay = 1000;
|
private static final long initialRepeatDelay = 1000;
|
||||||
private static final long repeatIntervalInMilliseconds = 300;
|
private static final long repeatIntervalInMilliseconds = 300;
|
||||||
|
|
|
@ -23,10 +23,10 @@ import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.graphics.drawable.TransitionDrawable;
|
import android.graphics.drawable.TransitionDrawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.support.v7.widget.AppCompatImageView;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.widget.ImageView;
|
|
||||||
|
|
||||||
public class RecyclingImageView extends ImageView {
|
public class RecyclingImageView extends AppCompatImageView {
|
||||||
private boolean invalidated = false;
|
private boolean invalidated = false;
|
||||||
private OnInvalidated onInvalidated;
|
private OnInvalidated onInvalidated;
|
||||||
|
|
||||||
|
@ -42,11 +42,6 @@ public class RecyclingImageView extends ImageView {
|
||||||
super(context, attrs, defStyleAttr);
|
super(context, attrs, defStyleAttr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
|
||||||
public RecyclingImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
|
||||||
super(context, attrs, defStyleAttr, defStyleRes);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDraw(Canvas canvas) {
|
public void onDraw(Canvas canvas) {
|
||||||
Drawable drawable = this.getDrawable();
|
Drawable drawable = this.getDrawable();
|
||||||
|
|
Loading…
Reference in New Issue