reverse the order of recent colors

This commit is contained in:
tibbi 2021-09-25 12:38:17 +02:00
parent 085b497ed0
commit 3c6e3cd0fd

View file

@ -165,7 +165,7 @@ class ColorPickerDialog(
if (recentColors.isNotEmpty()) {
recent_colors.beVisible()
val squareSize = context.resources.getDimensionPixelSize(R.dimen.colorpicker_hue_width)
recentColors.take(RECENT_COLORS_NUMBER).forEach { recentColor ->
recentColors.take(RECENT_COLORS_NUMBER).reversed().forEach { recentColor ->
val recentColorView = ImageView(context)
recentColorView.id = View.generateViewId()
recentColorView.layoutParams = ViewGroup.LayoutParams(squareSize, squareSize)