Skip to content

Commit

Permalink
Make color palette more accessible (closes #133)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmud0808 committed Oct 13, 2024
1 parent 303dad1 commit 7b844e6
Show file tree
Hide file tree
Showing 2 changed files with 558 additions and 427 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ class ColorPaletteFragment : Fragment() {

val textView = TextView(requireContext()).apply {
text = colorCodes[j].toString()
rotation = 270f
setTextColor(calculateTextColor(systemColors[i][j]))
setTextSize(TypedValue.COMPLEX_UNIT_SP, 10f)
setTextSize(TypedValue.COMPLEX_UNIT_SP, 12f)
alpha = 0.8f
setMaxLines(1)
setSingleLine(true)
Expand All @@ -181,9 +180,8 @@ class ColorPaletteFragment : Fragment() {
)
}

(colorTableRows[i].getChildAt(j) as ViewGroup).addView(textView)
(colorTableRows[i].getChildAt(j) as LinearLayout).gravity =
Gravity.CENTER
(childView as ViewGroup).addView(textView)
(childView as LinearLayout).gravity = Gravity.CENTER
}
}

Expand Down
Loading

0 comments on commit 7b844e6

Please sign in to comment.