Fixed bug with Palette API
This commit is contained in:
parent
9eedc19b11
commit
ab134a8927
@ -1619,10 +1619,9 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
@Override
|
@Override
|
||||||
public void onGenerated(Palette palette) {
|
public void onGenerated(Palette palette) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
int color = palette.getVibrantColor(mContext.getResources().getColor(
|
int color = 0xff000000 | palette.getVibrantColor(mContext.getResources()
|
||||||
R.color.primary_color));
|
.getColor(R.color.primary_color));
|
||||||
ColorDrawable draw = (ColorDrawable) mPageLayout.getBackground();
|
ColorDrawable draw = (ColorDrawable) mPageLayout.getBackground();
|
||||||
|
|
||||||
ValueAnimator anim = ValueAnimator.ofObject(new ArgbEvaluator(),
|
ValueAnimator anim = ValueAnimator.ofObject(new ArgbEvaluator(),
|
||||||
draw.getColor(), color);
|
draw.getColor(), color);
|
||||||
anim.addUpdateListener(new AnimatorUpdateListener() {
|
anim.addUpdateListener(new AnimatorUpdateListener() {
|
||||||
@ -2078,9 +2077,9 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
callback.onCustomViewHidden();
|
callback.onCustomViewHidden();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try{
|
try {
|
||||||
view.setKeepScreenOn(true);
|
view.setKeepScreenOn(true);
|
||||||
} catch (SecurityException e){
|
} catch (SecurityException e) {
|
||||||
Log.e(Constants.TAG, "WebView is not allowed to keep the screen on");
|
Log.e(Constants.TAG, "WebView is not allowed to keep the screen on");
|
||||||
}
|
}
|
||||||
mOriginalOrientation = getRequestedOrientation();
|
mOriginalOrientation = getRequestedOrientation();
|
||||||
@ -2108,9 +2107,9 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
}
|
}
|
||||||
Log.d(Constants.TAG, "onHideCustomView");
|
Log.d(Constants.TAG, "onHideCustomView");
|
||||||
mCurrentView.setVisibility(View.VISIBLE);
|
mCurrentView.setVisibility(View.VISIBLE);
|
||||||
try{
|
try {
|
||||||
mCustomView.setKeepScreenOn(false);
|
mCustomView.setKeepScreenOn(false);
|
||||||
} catch (SecurityException e){
|
} catch (SecurityException e) {
|
||||||
Log.e(Constants.TAG, "WebView is not allowed to keep the screen on");
|
Log.e(Constants.TAG, "WebView is not allowed to keep the screen on");
|
||||||
}
|
}
|
||||||
setFullscreen(mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false));
|
setFullscreen(mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user