|
2 | 2 | <!-- We do only want the padding on the start side --> |
3 | 3 | <net.squanchy.schedule.view.OtherEventItemView |
4 | 4 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 5 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
5 | 6 | xmlns:tools="http://schemas.android.com/tools" |
6 | 7 | android:layout_width="match_parent" |
7 | 8 | android:layout_height="wrap_content" |
|
11 | 12 | tools:layout_margin="16dp" |
12 | 13 | tools:ignore="RtlSymmetry"> |
13 | 14 |
|
14 | | - <LinearLayout |
| 15 | + <android.support.constraint.ConstraintLayout |
| 16 | + android:id="@+id/linearLayout" |
15 | 17 | android:layout_width="match_parent" |
16 | | - android:layout_height="wrap_content" |
17 | | - android:orientation="horizontal"> |
| 18 | + android:layout_height="wrap_content"> |
18 | 19 |
|
19 | | - <LinearLayout |
20 | | - android:layout_width="0dp" |
| 20 | + <TextView |
| 21 | + android:id="@+id/title" |
| 22 | + style="@style/Schedule.Card.Title" |
| 23 | + android:layout_width="@dimen/match_constraint" |
21 | 24 | android:layout_height="wrap_content" |
22 | | - android:layout_weight="1" |
23 | | - android:layout_gravity="center_vertical" |
24 | | - android:orientation="vertical"> |
25 | | - |
26 | | - <TextView |
27 | | - android:id="@+id/title" |
28 | | - style="@style/Schedule.Card.Title" |
29 | | - android:layout_width="match_parent" |
30 | | - android:layout_height="wrap_content" |
31 | | - tools:text="Designing for an Android future" /> |
32 | | - |
33 | | - <TextView |
34 | | - android:id="@+id/timestamp" |
35 | | - style="@style/Schedule.Card.Timestamp" |
36 | | - android:layout_width="wrap_content" |
37 | | - android:layout_height="wrap_content" |
38 | | - android:layout_marginTop="@dimen/card_timestamp_margin_top" |
39 | | - tools:text="12:00" /> |
40 | | - |
41 | | - </LinearLayout> |
| 25 | + app:layout_constraintStart_toStartOf="parent" |
| 26 | + app:layout_constraintTop_toTopOf="@+id/illustration" |
| 27 | + app:layout_constraintEnd_toStartOf="@+id/illustration" |
| 28 | + app:layout_constraintBottom_toTopOf="@+id/timestamp" |
| 29 | + app:layout_constraintVertical_chainStyle="packed" |
| 30 | + app:layout_goneMarginEnd="@dimen/card_padding_horizontal" |
| 31 | + tools:text="Designing for an Android future" /> |
| 32 | + |
| 33 | + <TextView |
| 34 | + android:id="@+id/timestamp" |
| 35 | + style="@style/Schedule.Card.Timestamp" |
| 36 | + android:layout_width="wrap_content" |
| 37 | + android:layout_height="wrap_content" |
| 38 | + android:layout_marginTop="@dimen/card_timestamp_margin_top" |
| 39 | + app:layout_constraintStart_toStartOf="@+id/title" |
| 40 | + app:layout_constraintTop_toBottomOf="@+id/title" |
| 41 | + app:layout_constraintBottom_toBottomOf="@+id/illustration" |
| 42 | + tools:text="12:00" /> |
42 | 43 |
|
43 | 44 | <ImageView |
44 | 45 | android:id="@+id/illustration" |
45 | 46 | android:layout_width="@dimen/card_other_illustration_width" |
46 | 47 | android:layout_height="@dimen/card_other_illustration_height" |
47 | 48 | android:scaleType="centerInside" |
| 49 | + app:layout_constraintTop_toTopOf="parent" |
| 50 | + app:layout_constraintEnd_toEndOf="parent" |
| 51 | + app:layout_constraintBottom_toBottomOf="parent" |
48 | 52 | tools:src="@drawable/lunch" /> |
49 | 53 |
|
50 | | - </LinearLayout> |
| 54 | + </android.support.constraint.ConstraintLayout> |
51 | 55 |
|
52 | 56 | </net.squanchy.schedule.view.OtherEventItemView> |
0 commit comments