2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 7
7
<variable name =" element" type =" fr.nuage.souvenirs.viewmodel.TextElementViewModel" />
8
8
<variable name =" album" type =" fr.nuage.souvenirs.viewmodel.AlbumViewModel" />
9
9
<import type =" fr.nuage.souvenirs.view.DataBindingAdapters" />
10
+ <import type =" android.graphics.Typeface" />
10
11
</data >
11
12
12
13
<androidx .constraintlayout.widget.ConstraintLayout
28
29
android : id =" @+id/text_element"
29
30
android : layout_width =" match_parent"
30
31
android : layout_height =" match_parent"
31
- android : text =" @{ element.text} "
32
+ android : text =' @{ element.text.equals("") ? @string/text_element_hint : element.text } '
32
33
android : textAlignment =" center"
33
34
android : textAppearance =" @style/AppTheme.AlbumTextDefault"
35
+ android : typeface =' @{Typeface.defaultFromStyle(element.text.equals("") ? Typeface.ITALIC : Typeface.NORMAL)}'
36
+ android : textColor =' @{ element.text.equals("") ? @color/textHint : @color/textDefault }'
34
37
app : autoSizeMinTextSize =" 2sp"
35
38
app : autoSizeMaxTextSize =" 1000sp"
36
39
app : autoSizeTextType =" uniform"
40
43
app : layout_constraintTop_toBottomOf =" parent"
41
44
is_selected =" @{element.isSelected}"
42
45
android : tag =" @{element.id}"
43
- android : hint =" @string/text_element_hint"
44
46
tools : text =" texte" >
45
47
46
48
</fr .nuage.souvenirs.view.TextElementView>
Original file line number Diff line number Diff line change 10
10
<color name =" secondaryTextColor" >#000000</color >
11
11
12
12
<color name =" textDefault" >#595959</color >
13
+ <color name =" textHint" >#D6D6D6</color >
13
14
<color name =" background" >#fffefb</color >
14
15
<color name =" black" >#000000</color >
15
16
<color name =" red" >#FF0000</color >
0 commit comments