Fix current chapter having the same color as the dialog background (#6315)
This commit is contained in:
parent
08ee701dd7
commit
22e6a0c40f
@ -86,7 +86,7 @@ public class ChaptersListAdapter extends RecyclerView.Adapter<ChaptersListAdapte
|
|||||||
|
|
||||||
if (position == currentChapterIndex) {
|
if (position == currentChapterIndex) {
|
||||||
float density = context.getResources().getDisplayMetrics().density;
|
float density = context.getResources().getDisplayMetrics().density;
|
||||||
holder.itemView.setBackgroundColor(SurfaceColors.getColorForElevation(context, 8 * density));
|
holder.itemView.setBackgroundColor(SurfaceColors.getColorForElevation(context, 32 * density));
|
||||||
float progress = ((float) (currentChapterPosition - sc.getStart())) / duration;
|
float progress = ((float) (currentChapterPosition - sc.getStart())) / duration;
|
||||||
progress = Math.max(progress, CircularProgressBar.MINIMUM_PERCENTAGE);
|
progress = Math.max(progress, CircularProgressBar.MINIMUM_PERCENTAGE);
|
||||||
progress = Math.min(progress, CircularProgressBar.MAXIMUM_PERCENTAGE);
|
progress = Math.min(progress, CircularProgressBar.MAXIMUM_PERCENTAGE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user