mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-14 21:18:51 -06:00
Fix habit group creation
This commit is contained in:
@@ -136,10 +136,11 @@ class HabitCardView(
|
||||
init {
|
||||
scoreRing = RingView(context).apply {
|
||||
val thickness = dp(3f)
|
||||
val margin = dp(8f).toInt()
|
||||
val rightMargin = dp(8f).toInt()
|
||||
val ringSize = dp(15f).toInt()
|
||||
val leftMargin = if (habit?.isSubHabit() == true) dp(30f).toInt() else dp(8f).toInt()
|
||||
layoutParams = LinearLayout.LayoutParams(ringSize, ringSize).apply {
|
||||
setMargins(margin, 0, margin, 0)
|
||||
setMargins(leftMargin, 0, rightMargin, 0)
|
||||
gravity = Gravity.CENTER
|
||||
}
|
||||
setThickness(thickness)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.isoron.uhabits.activities.habits.list.views
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Typeface
|
||||
import android.graphics.text.LineBreaker.BREAK_STRATEGY_BALANCED
|
||||
import android.os.Build
|
||||
import android.os.Build.VERSION.SDK_INT
|
||||
@@ -75,6 +76,7 @@ class HabitGroupCardView(
|
||||
if (SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
breakStrategy = BREAK_STRATEGY_BALANCED
|
||||
}
|
||||
setTypeface(typeface, Typeface.BOLD)
|
||||
}
|
||||
|
||||
addButtonView = AddButtonView(context)
|
||||
|
||||
Reference in New Issue
Block a user