|
7 | 7 | <import type="fr.nuage.souvenirs.model.ImageElement" />
|
8 | 8 | <import type="fr.nuage.souvenirs.viewmodel.VideoElementViewModel" />
|
9 | 9 | <import type="android.view.View"/>
|
| 10 | + <import type="android.widget.ImageView"/> |
10 | 11 | <variable name="element" type="fr.nuage.souvenirs.viewmodel.VideoElementViewModel"/>
|
11 | 12 | <variable name="album" type="fr.nuage.souvenirs.viewmodel.AlbumViewModel" />
|
12 | 13 | <import type="fr.nuage.souvenirs.view.DataBindingAdapters" />
|
|
27 | 28 | app:layout_constraintTop_toBottomOf="parent"
|
28 | 29 | >
|
29 | 30 |
|
| 31 | + <ImageView |
| 32 | + android:id="@+id/image_background" |
| 33 | + android:layout_width="match_parent" |
| 34 | + android:layout_height="match_parent" |
| 35 | + android:alpha="0.2" |
| 36 | + android:scaleType="centerCrop" |
| 37 | + app:srcCompat="@{element.zoom >= 100 ? null : element.imagePath}" |
| 38 | + tools:visibility="visible" /> |
| 39 | + |
30 | 40 | <RelativeLayout
|
31 | 41 | android:layout_width="match_parent"
|
32 | 42 | android:layout_height="match_parent"
|
|
51 | 61 | android:layout_marginStart="8dp"
|
52 | 62 | android:layout_marginTop="8dp"
|
53 | 63 | android:alpha="0.5"
|
54 |
| - android:visibility="@{(element instanceof VideoElementViewModel) ? View.VISIBLE : View.GONE }" |
55 | 64 | app:layout_constraintDimensionRatio="h,1:1"
|
56 | 65 | app:layout_constraintStart_toStartOf="parent"
|
57 | 66 | app:layout_constraintTop_toTopOf="parent"
|
58 |
| - android:scaleType="@{element.transformType}" |
59 |
| - android:scaleX='@{element.transformType.equals(ImageElement.ZOOM_OFFSET) ? element.zoom : null }' |
60 |
| - android:scrollX='@{element.transformType.equals(ImageElement.ZOOM_OFFSET) ? element.offsetX : null }' |
61 |
| - android:scrollY='@{element.transformType.equals(ImageElement.ZOOM_OFFSET) ? element.offsetY : null }' |
62 | 67 | app:srcCompat="@drawable/ic_baseline_videocam_24"
|
63 | 68 | app:tint="@color/secondaryColor"
|
64 | 69 | tools:visibility="visible" />
|
|
0 commit comments