Drop hardcoded dynamic color
* Fix crash on api<S as well
This commit is contained in:
1 parent
e48ecac3cd
commit
1eb86355cb
8 files changed
+16
-19
No files matched your search
@@ -379,7 +379,7 @@ public class DownloadsScene extends ToolbarScene
|
||||
|
||||
mFastScroller.attachToRecyclerView(mRecyclerView);
|
||||
HandlerDrawable handlerDrawable = new HandlerDrawable();
|
||||
handlerDrawable.setColor(com.google.android.material.R.color.material_dynamic_neutral100);
|
||||
handlerDrawable.setColor(ResourcesKt.resolveColor(getTheme(), com.google.android.material.R.attr.colorPrimary));
|
||||
mFastScroller.setHandlerDrawable(handlerDrawable);
|
||||
mFastScroller.setOnDragHandlerListener(this);
|
||||
|
||||
|
||||
@@ -85,6 +85,8 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import rikka.core.res.ResourcesKt;
|
||||
|
||||
public class HistoryScene extends ToolbarScene {
|
||||
|
||||
/*---------------
|
||||
@@ -232,7 +234,7 @@ public class HistoryScene extends ToolbarScene {
|
||||
|
||||
mFastScroller.attachToRecyclerView(mRecyclerView);
|
||||
HandlerDrawable handlerDrawable = new HandlerDrawable();
|
||||
handlerDrawable.setColor(com.google.android.material.R.color.material_dynamic_neutral100);
|
||||
handlerDrawable.setColor(ResourcesKt.resolveColor(getTheme(), com.google.android.material.R.attr.colorPrimary));
|
||||
mFastScroller.setHandlerDrawable(handlerDrawable);
|
||||
|
||||
updateLazyList();
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.hippo.ehviewer.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -60,9 +61,9 @@ public class GalleryGuideView extends ViewGroup implements View.OnClickListener
|
||||
}
|
||||
|
||||
private void init(Context context) {
|
||||
mBgColor = ResourcesKt.resolveColor(context.getTheme(), R.attr.guideBackgroundColor);
|
||||
mBgColor = Color.GRAY;
|
||||
mPaint = new Paint();
|
||||
mPaint.setColor(ResourcesKt.resolveColor(context.getTheme(), R.attr.guideTitleColor));
|
||||
mPaint.setColor(Color.WHITE);
|
||||
mPaint.setStyle(Paint.Style.STROKE);
|
||||
mPaint.setStrokeWidth(context.getResources().getDimension(R.dimen.gallery_guide_divider_width));
|
||||
setOnClickListener(this);
|
||||
|
||||
@@ -55,6 +55,8 @@ import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import rikka.core.res.ResourcesKt;
|
||||
|
||||
public class ContentLayout extends FrameLayout {
|
||||
|
||||
private CircularProgressIndicator mProgressView;
|
||||
@@ -102,7 +104,7 @@ public class ContentLayout extends FrameLayout {
|
||||
|
||||
mFastScroller.attachToRecyclerView(mRecyclerView);
|
||||
HandlerDrawable drawable = new HandlerDrawable();
|
||||
drawable.setColor(com.google.android.material.R.color.material_dynamic_neutral100);
|
||||
drawable.setColor(ResourcesKt.resolveColor(context.getTheme(), androidx.appcompat.R.attr.colorPrimary));
|
||||
mFastScroller.setHandlerDrawable(drawable);
|
||||
|
||||
mRefreshLayout.setColorSchemeResources(
|
||||
|
||||
Reference in new issue
Block a user