Skip to content

Commit 87c8e78

Browse files
authored
Samples: Update to Android 36 (#2257)
* Samples: Update to Android 36 * Samples: Update to Android 36
1 parent 42cfbd8 commit 87c8e78

31 files changed

Lines changed: 227 additions & 214 deletions

File tree

samples/LiveEffect/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 35
5+
compileSdkVersion 36
66
defaultConfig {
77
applicationId 'com.google.oboe.samples.liveeffect'
8-
minSdkVersion 21
9-
targetSdkVersion 35
8+
minSdkVersion 23
9+
targetSdkVersion 36
1010
versionCode 1
1111
versionName '1.0'
1212
ndk {

samples/LiveEffect/src/main/res/layout-v21/activity_main.xml

Lines changed: 0 additions & 128 deletions
This file was deleted.

samples/LiveEffect/src/main/res/layout/activity_main.xml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,40 @@
2020
android:layout_width="match_parent"
2121
android:layout_height="match_parent"
2222
tools:context="com.google.oboe.samples.liveEffect.MainActivity"
23+
android:fitsSystemWindows="true"
2324
tools:layout_editor_absoluteY="81dp">
2425

26+
<LinearLayout
27+
android:id="@+id/title_bar"
28+
android:layout_width="match_parent"
29+
android:layout_height="?attr/actionBarSize"
30+
android:orientation="horizontal"
31+
android:elevation="4dp"
32+
android:gravity="center_vertical"
33+
app:layout_constraintLeft_toLeftOf="parent"
34+
app:layout_constraintTop_toTopOf="parent"
35+
android:paddingStart="16dp"
36+
android:paddingEnd="16dp">
37+
38+
<TextView
39+
android:layout_width="wrap_content"
40+
android:layout_height="wrap_content"
41+
android:text="Live Effect"
42+
android:textColor="@android:color/black"
43+
android:textSize="20sp"
44+
android:textStyle="bold" />
45+
46+
</LinearLayout>
47+
2548
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
2649
android:id="@+id/apiSelectionGroup"
2750
android:layout_width="fill_parent"
2851
android:layout_height="wrap_content"
2952
android:layout_marginStart="@dimen/activity_horizontal_margin"
3053
android:layout_marginLeft="@dimen/activity_horizontal_margin"
31-
android:layout_marginTop="@dimen/activity_vertical_margin"
3254
android:orientation="horizontal"
3355
app:layout_constraintLeft_toLeftOf="parent"
34-
app:layout_constraintTop_toTopOf="parent">
56+
app:layout_constraintTop_toBottomOf="@id/title_bar" >
3557

3658
<TextView
3759
android:id="@+id/apiTextView"
@@ -102,10 +124,12 @@
102124
android:id="@+id/button_toggle_effect"
103125
android:layout_width="wrap_content"
104126
android:layout_height="wrap_content"
127+
android:layout_marginTop="72dp"
105128
android:gravity="center"
106-
android:layout_marginTop="@dimen/activity_vertical_margin"
107-
android:textAllCaps="false"
108129
android:text="@string/start_effect"
130+
android:textAllCaps="false"
131+
app:layout_constraintEnd_toEndOf="parent"
132+
app:layout_constraintHorizontal_bias="0.53"
109133
app:layout_constraintStart_toStartOf="parent"
110134
app:layout_constraintTop_toBottomOf="@+id/playback_devices_spinner" />
111135

samples/LiveEffect/src/main/res/values-v21/styles.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<resources>
22
<color name="colorBlue">#4444CC</color>
3+
<color name="colorPrimaryDark">#ffffff</color>
34
</resources>
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<resources>
2-
3-
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
5-
<!-- Customize your theme here. -->
3+
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
4+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
5+
<item name="android:windowLightStatusBar">true</item>
66
</style>
7-
87
</resources>

samples/MegaDrone/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ apply plugin: 'kotlin-android'
44
android {
55
defaultConfig {
66
applicationId "com.google.oboe.samples.megadrone"
7-
minSdkVersion 21
8-
targetSdkVersion 35
9-
compileSdkVersion 35
7+
minSdkVersion 23
8+
targetSdkVersion 36
9+
compileSdkVersion 36
1010
versionCode 1
1111
versionName "1.0"
1212
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

samples/MegaDrone/src/main/res/layout/activity_main.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,30 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7+
android:fitsSystemWindows="true"
78
tools:context=".MainActivity">
89

10+
<LinearLayout
11+
android:id="@+id/title_bar"
12+
android:layout_width="match_parent"
13+
android:layout_height="?attr/actionBarSize"
14+
android:orientation="horizontal"
15+
android:elevation="4dp"
16+
android:gravity="center_vertical"
17+
android:background="@color/colorPrimary"
18+
android:paddingStart="16dp"
19+
android:paddingEnd="16dp">
20+
21+
<TextView
22+
android:layout_width="wrap_content"
23+
android:layout_height="wrap_content"
24+
android:text="Mega Drone"
25+
android:textColor="@android:color/white"
26+
android:textSize="20sp"
27+
android:textStyle="bold" />
28+
29+
</LinearLayout>
30+
931
<TextView
1032
android:id="@+id/sample_text"
1133
android:layout_width="wrap_content"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<color name="colorPrimary">#008577</color>
4-
<color name="colorPrimaryDark">#00574B</color>
4+
<color name="colorPrimaryDark">#ffffff</color>
55
<color name="colorAccent">#D81B60</color>
66
</resources>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<resources>
22

33
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
55
<!-- Customize your theme here. -->
66
<item name="colorPrimary">@color/colorPrimary</item>
77
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
88
<item name="colorAccent">@color/colorAccent</item>
9+
<item name="android:windowLightStatusBar">true</item>
910
</style>
1011

1112
</resources>

0 commit comments

Comments
 (0)