|
|
|
@ -29,6 +29,7 @@ import android.view.View
|
|
|
|
|
import android.view.View.OnClickListener
|
|
|
|
|
import android.view.View.OnLongClickListener
|
|
|
|
|
import org.isoron.uhabits.R
|
|
|
|
|
import org.isoron.uhabits.core.models.Entry
|
|
|
|
|
import org.isoron.uhabits.core.preferences.Preferences
|
|
|
|
|
import org.isoron.uhabits.inject.ActivityContext
|
|
|
|
|
import org.isoron.uhabits.utils.InterfaceUtils.getDimension
|
|
|
|
@ -132,6 +133,12 @@ class NumberButtonView(
|
|
|
|
|
private val lowContrast: Int
|
|
|
|
|
private val mediumContrast: Int
|
|
|
|
|
|
|
|
|
|
private val paint = TextPaint().apply {
|
|
|
|
|
typeface = getFontAwesome()
|
|
|
|
|
isAntiAlias = true
|
|
|
|
|
textAlign = Paint.Align.CENTER
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private val pUnit: TextPaint = TextPaint().apply {
|
|
|
|
|
textSize = getDimension(context, R.dimen.smallerTextSize)
|
|
|
|
|
typeface = NORMAL_TYPEFACE
|
|
|
|
@ -169,6 +176,11 @@ class NumberButtonView(
|
|
|
|
|
typeface = BOLD_TYPEFACE
|
|
|
|
|
textSize = dim(R.dimen.smallTextSize)
|
|
|
|
|
}
|
|
|
|
|
value == Entry.SKIP.toDouble() / 1000 ->{
|
|
|
|
|
label = resources.getString(R.string.fa_skipped)
|
|
|
|
|
textSize = dim(R.dimen.smallTextSize)
|
|
|
|
|
typeface = getFontAwesome()
|
|
|
|
|
}
|
|
|
|
|
preferences.areQuestionMarksEnabled -> {
|
|
|
|
|
label = resources.getString(R.string.fa_question)
|
|
|
|
|
typeface = getFontAwesome()
|
|
|
|
|