Skip to content

Commit

Permalink
FIX: Label date time element with preset value
Browse files Browse the repository at this point in the history
  • Loading branch information
Zdeněk Balák committed May 7, 2019
1 parent f630264 commit 0c83baa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ class LabelDateTimeElement(private val label: String,
private fun prepareText(inflater: LayoutInflater, context: Context, formStyleBundle: FormStyleBundle, root: ViewGroup): TextView {
val textView = inflater.inflate(textComponent, root, false) as TextView
textView.setTextColorResourceId(context, formStyleBundle.secondaryTextColor)
textView.text = if (value != null) {
sdf.format(value)
val tmpValue = value
textView.text = if (tmpValue != null) {
sdf.format(tmpValue.toDate())
} else {
hint
}
Expand Down

0 comments on commit 0c83baa

Please sign in to comment.