mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Use ContextCompat.getColor to support API levels below 23.
Found while debugging on Lollipop. Change-Id: Ibe97fd30c4ee8cd0c1735a41802b859345f9e931
This commit is contained in:
@@ -25,6 +25,7 @@ import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.graphics.ColorUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -69,7 +70,7 @@ public class Hotseat extends FrameLayout
|
||||
mLauncher = (Launcher) context;
|
||||
mHasVerticalHotseat = mLauncher.getDeviceProfile().isVerticalBarLayout();
|
||||
mBackgroundColor = ColorUtils.setAlphaComponent(
|
||||
context.getColor(R.color.all_apps_container_color), 0);
|
||||
ContextCompat.getColor(context, R.color.all_apps_container_color), 0);
|
||||
mBackground = new ColorDrawable(mBackgroundColor);
|
||||
setBackground(mBackground);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ArgbEvaluator;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.view.animation.FastOutSlowInInterpolator;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
@@ -101,7 +102,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
|
||||
R.dimen.all_apps_bezel_swipe_height);
|
||||
|
||||
mEvaluator = new ArgbEvaluator();
|
||||
mAllAppsBackgroundColor = l.getColor(R.color.all_apps_container_color);
|
||||
mAllAppsBackgroundColor = ContextCompat.getColor(l, R.color.all_apps_container_color);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user