|
4 | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | 5 | android:id="@+id/speakerDetailsLayout" |
6 | 6 | android:layout_width="match_parent" |
7 | | - android:layout_height="wrap_content"> |
| 7 | + android:layout_height="match_parent"> |
8 | 8 |
|
9 | 9 | <android.support.design.widget.AppBarLayout |
| 10 | + android:id="@+id/appbar" |
10 | 11 | android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" |
11 | | - android:layout_width="match_parent" |
12 | | - android:layout_height="wrap_content"> |
| 12 | + android:layout_width="@dimen/match_constraint" |
| 13 | + android:layout_height="wrap_content" |
| 14 | + app:layout_constraintStart_toStartOf="parent" |
| 15 | + app:layout_constraintEnd_toEndOf="parent" |
| 16 | + app:layout_constraintTop_toTopOf="parent"> |
13 | 17 |
|
14 | 18 | <android.support.v7.widget.Toolbar |
15 | 19 | android:id="@+id/toolbar" |
|
29 | 33 | style="@style/SpeakerDetails.Header.Speaker.Photo" |
30 | 34 | android:layout_width="@dimen/speaker_details_speaker_photo" |
31 | 35 | android:layout_height="@dimen/speaker_details_speaker_photo" |
32 | | - android:layout_gravity="start|center_vertical" |
33 | | - android:layout_marginEnd="@dimen/speaker_details_speaker_photo_margin_end" |
| 36 | + app:layout_constraintStart_toStartOf="parent" |
| 37 | + app:layout_constraintTop_toTopOf="parent" |
34 | 38 | tools:src="?colorAccent" /> |
35 | 39 |
|
36 | | - <LinearLayout |
37 | | - android:layout_width="match_parent" |
| 40 | + <TextView |
| 41 | + android:id="@+id/speakerName" |
| 42 | + style="@style/SpeakerDetails.Header.Speaker.Name" |
| 43 | + android:layout_width="wrap_content" |
38 | 44 | android:layout_height="wrap_content" |
39 | | - android:layout_gravity="fill_horizontal|center_vertical" |
40 | | - android:orientation="vertical"> |
| 45 | + android:layout_marginStart="@dimen/speaker_details_speaker_photo_margin_end" |
| 46 | + app:layout_constraintTop_toTopOf="@+id/speakerPhoto" |
| 47 | + app:layout_constraintStart_toEndOf="@+id/speakerPhoto" |
| 48 | + app:layout_constraintBottom_toTopOf="@+id/speakerCompany" |
| 49 | + app:layout_constraintVertical_chainStyle="packed" |
| 50 | + tools:text="Qi Qu" /> |
41 | 51 |
|
42 | | - <TextView |
43 | | - android:id="@+id/speakerName" |
44 | | - style="@style/SpeakerDetails.Header.Speaker.Name" |
45 | | - android:layout_width="wrap_content" |
46 | | - android:layout_height="wrap_content" |
47 | | - tools:text="Qi Qu" /> |
48 | | - |
49 | | - <TextView |
50 | | - android:id="@+id/speakerCompany" |
51 | | - style="@style/SpeakerDetails.Header.Speaker.Company" |
52 | | - android:layout_width="wrap_content" |
53 | | - android:layout_height="wrap_content" |
54 | | - tools:text="Novoda" /> |
55 | | - |
56 | | - </LinearLayout> |
| 52 | + <TextView |
| 53 | + android:id="@+id/speakerCompany" |
| 54 | + style="@style/SpeakerDetails.Header.Speaker.Company" |
| 55 | + android:layout_width="wrap_content" |
| 56 | + android:layout_height="@dimen/match_constraint" |
| 57 | + app:layout_constraintTop_toBottomOf="@+id/speakerName" |
| 58 | + app:layout_constraintStart_toStartOf="@+id/speakerName" |
| 59 | + tools:text="Novoda" /> |
57 | 60 |
|
58 | 61 | </net.squanchy.speaker.widget.SpeakerHeaderView> |
59 | 62 |
|
60 | 63 | </android.support.design.widget.AppBarLayout> |
61 | 64 |
|
62 | 65 | <android.support.v4.widget.NestedScrollView |
63 | 66 | style="@style/SpeakerDetails.Bio" |
64 | | - android:layout_width="match_parent" |
65 | | - android:layout_height="match_parent"> |
| 67 | + android:layout_width="@dimen/match_constraint" |
| 68 | + android:layout_height="@dimen/match_constraint" |
| 69 | + app:layout_constraintStart_toStartOf="parent" |
| 70 | + app:layout_constraintEnd_toEndOf="parent" |
| 71 | + app:layout_constraintTop_toBottomOf="@+id/appbar" |
| 72 | + app:layout_constraintBottom_toBottomOf="parent"> |
66 | 73 |
|
67 | 74 | <TextView |
68 | 75 | android:id="@+id/speakerBio" |
69 | 76 | style="@style/SpeakerDetails.Bio.Text" |
70 | 77 | android:layout_width="match_parent" |
71 | 78 | android:layout_height="wrap_content" |
72 | | - android:layout_marginStart="@dimen/speaker_details_bio_padding" |
73 | | - android:layout_marginTop="@dimen/speaker_details_bio_padding" |
74 | | - android:layout_marginEnd="@dimen/speaker_details_bio_padding" |
| 79 | + android:padding="@dimen/speaker_details_bio_padding_horizontal" |
75 | 80 | tools:text="Now this is a story all about how\nMy life got flipped-turned upside down\nAnd I'd like to take a minute\nJust sit right there\nI'll tell you how I became the prince of a town called Bel-Air" /> |
76 | 81 |
|
77 | 82 | </android.support.v4.widget.NestedScrollView> |
|
0 commit comments