Skip to content

Commit

Permalink
Capitalize tool titles
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Nov 19, 2023
1 parent 03c52dc commit c502abe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 63 deletions.
60 changes: 0 additions & 60 deletions app/src/main/java/com/kylecorry/trail_sense/tools/ui/ToolButton.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.kylecorry.trail_sense.tools.ui.items.render
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.core.view.setMargins
import com.kylecorry.andromeda.core.capitalizeWords
import com.kylecorry.andromeda.core.system.Resources
import com.kylecorry.andromeda.core.ui.setCompoundDrawables
import com.kylecorry.trail_sense.databinding.ListItemToolBinding
Expand Down Expand Up @@ -31,7 +32,7 @@ class CategoryToolListItemRenderer : ToolListItemRenderer {
)
binding.title.paint.isFakeBoldText = true
binding.title.textSize = 14f
binding.title.text = item.title
binding.title.text = item.title?.capitalizeWords()
binding.title.isVisible = item.title != null

// Click action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.kylecorry.trail_sense.tools.ui.items.render
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.core.view.setMargins
import com.kylecorry.andromeda.core.capitalizeWords
import com.kylecorry.andromeda.core.system.Resources
import com.kylecorry.andromeda.core.ui.Colors
import com.kylecorry.andromeda.core.ui.setCompoundDrawables
Expand Down Expand Up @@ -36,7 +37,7 @@ class HeaderToolListItemRenderer : ToolListItemRenderer {
binding.title.setTextColor(Resources.androidTextColorPrimary(context))
binding.title.paint.isFakeBoldText = false
binding.title.textSize = 24f
binding.title.text = item.title
binding.title.text = item.title?.capitalizeWords()
binding.title.isVisible = item.title != null

// Remove root click listeners
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.res.ColorStateList
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.core.view.setMargins
import com.kylecorry.andromeda.core.capitalizeWords
import com.kylecorry.andromeda.core.system.Resources
import com.kylecorry.andromeda.core.ui.Colors
import com.kylecorry.andromeda.core.ui.setCompoundDrawables
Expand Down Expand Up @@ -39,7 +40,7 @@ class ToolButtonToolListItemRenderer : ToolListItemRenderer {
binding.title.setTextColor(Resources.androidTextColorPrimary(context))
binding.title.paint.isFakeBoldText = false
binding.title.textSize = 14f
binding.title.text = item.title
binding.title.text = item.title?.capitalizeWords()
binding.title.isVisible = item.title != null

// Click action
Expand Down

0 comments on commit c502abe

Please sign in to comment.