Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Commit abfaa41

Browse files
committed
[ADDED] Thumbnail of the TED talk.
1 parent 79f3390 commit abfaa41

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed
2.39 MB
Loading

app/src/main/res/layout/demo_ted_talk_playback.xml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
~ limitations under the License.
1717
-->
1818

19+
20+
<!--
21+
About this layout:
22+
====================
23+
This layout is somewhat close view of TED app's video playback screen in portrait mode.
24+
This layout uses following ConstraintLayout features:
25+
* Horizontal chains - Playback controls row, time control
26+
* Vertical chains - Author info block
27+
* Aspect ratio - video image view
28+
-->
1929
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2030
xmlns:app="http://schemas.android.com/apk/res-auto"
2131
xmlns:tools="http://schemas.android.com/tools"
@@ -110,19 +120,27 @@
110120
app:layout_constraintTop_toTopOf="@+id/action_forward15" />
111121

112122

123+
<!-- A black view that covers the full witdth to match the thumbnail extra space -->
124+
<View
125+
android:layout_width="0dp"
126+
android:layout_height="220dp"
127+
android:background="@color/md_black_1000"
128+
app:layout_constraintEnd_toEndOf="parent"
129+
app:layout_constraintStart_toStartOf="parent"
130+
app:layout_constraintTop_toTopOf="parent" />
113131
<ImageView
114132
android:id="@+id/video_player_thumbnail"
115133
android:layout_width="0dp"
116134
android:layout_height="220dp"
117-
118-
android:src="@drawable/ic_ted_talks_logo"
135+
android:src="@drawable/thumb_ted_talk"
119136
app:layout_constraintDimensionRatio="W,16:9"
120137
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_right"
121138
app:layout_constraintStart_toStartOf="@id/guideline_vertical_left"
122139
app:layout_constraintTop_toTopOf="parent"
123140
tools:background="#888" />
124141

125142

143+
126144
<SeekBar
127145
android:id="@+id/progressBar"
128146
style="?android:attr/progressBarStyleHorizontal"
@@ -136,15 +154,14 @@
136154
app:layout_constraintTop_toBottomOf="@+id/action_play_pause" />
137155

138156

139-
140157
<TextView
141158
android:id="@+id/talk_title"
142159
style="@style/TextAppearance.AppCompat.Title"
143160
android:layout_width="0dp"
144161
android:layout_height="wrap_content"
145-
android:layout_marginTop="16dp"
162+
android:layout_marginTop="8dp"
146163
android:gravity="center_horizontal"
147-
android:text="Why student journalists should be protected from censorship"
164+
android:text="The amazing brains and morphing skin of octopuses and other cephalopods"
148165
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_right"
149166
app:layout_constraintStart_toStartOf="@id/guideline_vertical_left"
150167
app:layout_constraintTop_toBottomOf="@+id/author" />
@@ -155,9 +172,9 @@
155172
style="@style/TextAppearance.AppCompat.Small"
156173
android:layout_width="0dp"
157174
android:layout_height="wrap_content"
158-
android:layout_marginTop="32dp"
175+
android:layout_marginTop="24dp"
159176
android:gravity="center_horizontal"
160-
android:text="Neha Madhira and Haley Stack"
177+
android:text="Roger Hanlon"
161178
app:layout_constraintEnd_toEndOf="@id/guideline_vertical_right"
162179
app:layout_constraintStart_toStartOf="@id/guideline_vertical_left"
163180
app:layout_constraintTop_toBottomOf="@+id/video_player_thumbnail" />

0 commit comments

Comments
 (0)