|
1 | | -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
| 1 | +<androidx.constraintlayout.widget.ConstraintLayout |
| 2 | + xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
2 | 4 | xmlns:tools="http://schemas.android.com/tools" |
3 | | - android:id="@+id/root_view" |
4 | 5 | android:layout_width="match_parent" |
5 | 6 | android:layout_height="match_parent" |
6 | | - tools:context="com.google.android.gms.example.nativeadvancedexample.MainActivity"> |
| 7 | + tools:context=".MainActivity"> |
7 | 8 |
|
8 | | - <LinearLayout |
| 9 | + <com.google.android.material.appbar.AppBarLayout |
| 10 | + android:id="@+id/app_bar_layout" |
9 | 11 | android:layout_width="match_parent" |
10 | 12 | android:layout_height="wrap_content" |
11 | | - android:orientation="vertical"> |
| 13 | + android:fitsSystemWindows="true" |
| 14 | + android:background="@color/colorPrimaryDark" |
| 15 | + app:layout_constraintTop_toTopOf="parent"> |
12 | 16 |
|
13 | | - <FrameLayout |
14 | | - android:id="@+id/ad_frame" |
| 17 | + <com.google.android.material.appbar.MaterialToolbar |
| 18 | + android:id="@+id/toolBar" |
15 | 19 | android:layout_width="match_parent" |
16 | | - android:layout_height="wrap_content" |
17 | | - android:layout_marginTop="16dp" /> |
| 20 | + android:layout_height="?attr/actionBarSize" |
| 21 | + app:titleTextColor="@android:color/white" |
| 22 | + app:title="@string/app_name" /> |
18 | 23 |
|
19 | | - <CheckBox |
20 | | - android:id="@+id/start_muted_checkbox" |
21 | | - android:layout_width="wrap_content" |
22 | | - android:layout_height="wrap_content" |
23 | | - android:checked="true" |
24 | | - android:text="Start video ads muted" /> |
| 24 | + </com.google.android.material.appbar.AppBarLayout> |
25 | 25 |
|
26 | | - <Button |
27 | | - android:id="@+id/refresh_button" |
28 | | - android:layout_width="wrap_content" |
29 | | - android:layout_height="wrap_content" |
30 | | - android:layout_gravity="center_horizontal" |
31 | | - android:layout_marginBottom="16dp" |
32 | | - android:layout_marginTop="16dp" |
33 | | - android:text="Refresh Ad" |
34 | | - android:visibility="gone" /> |
35 | | - |
36 | | - <TextView |
37 | | - android:text="Video status: " |
| 26 | + <ScrollView |
| 27 | + android:id="@+id/root_view" |
| 28 | + android:layout_width="match_parent" |
| 29 | + android:layout_height="0dp" |
| 30 | + app:layout_constraintTop_toBottomOf="@id/app_bar_layout" |
| 31 | + app:layout_constraintBottom_toBottomOf="parent"> |
| 32 | + |
| 33 | + <LinearLayout |
38 | 34 | android:layout_width="match_parent" |
39 | 35 | android:layout_height="wrap_content" |
40 | | - android:layout_marginLeft="16dp" |
41 | | - android:layout_marginRight="16dp" |
42 | | - android:id="@+id/video_status_text" |
43 | | - android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> |
| 36 | + android:orientation="vertical"> |
| 37 | + |
| 38 | + <FrameLayout |
| 39 | + android:id="@+id/ad_frame" |
| 40 | + android:layout_width="match_parent" |
| 41 | + android:layout_height="wrap_content" |
| 42 | + android:layout_marginTop="16dp" /> |
| 43 | + |
| 44 | + <CheckBox |
| 45 | + android:id="@+id/start_muted_checkbox" |
| 46 | + android:layout_width="wrap_content" |
| 47 | + android:layout_height="wrap_content" |
| 48 | + android:checked="true" |
| 49 | + android:text="Start video ads muted" /> |
| 50 | + |
| 51 | + <Button |
| 52 | + android:id="@+id/refresh_button" |
| 53 | + android:layout_width="wrap_content" |
| 54 | + android:layout_height="wrap_content" |
| 55 | + android:layout_gravity="center_horizontal" |
| 56 | + android:layout_marginBottom="16dp" |
| 57 | + android:layout_marginTop="16dp" |
| 58 | + android:text="Refresh Ad" |
| 59 | + android:visibility="gone" /> |
| 60 | + |
| 61 | + <TextView |
| 62 | + android:id="@+id/video_status_text" |
| 63 | + android:layout_width="match_parent" |
| 64 | + android:layout_height="wrap_content" |
| 65 | + android:layout_marginLeft="16dp" |
| 66 | + android:layout_marginRight="16dp" |
| 67 | + android:text="Video status: " |
| 68 | + android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> |
44 | 69 |
|
| 70 | + </LinearLayout> |
| 71 | + </ScrollView> |
45 | 72 |
|
46 | | - </LinearLayout> |
47 | | -</ScrollView> |
| 73 | +</androidx.constraintlayout.widget.ConstraintLayout> |
0 commit comments