Skip to content

Commit 8fbdeac

Browse files
Upgrade auf AndroidStudio Narwhal
1 parent c832b50 commit 8fbdeac

15 files changed

Lines changed: 47 additions & 62 deletions

File tree

app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ plugins {
33
}
44

55
android {
6-
namespace 'de.mide.zweiactivities'
7-
compileSdk 34
6+
namespace 'de.mide.android.zweiactivites'
7+
compileSdk 36
88

99
defaultConfig {
10-
applicationId "de.mide.zweiactivities"
10+
applicationId "de.mide.android.zweiactivites"
1111
minSdk 24
12-
targetSdk 34
12+
targetSdk 36
1313
versionCode 1
1414
versionName "1.0"
1515

@@ -23,8 +23,8 @@ android {
2323
}
2424
}
2525
compileOptions {
26-
sourceCompatibility JavaVersion.VERSION_1_8
27-
targetCompatibility JavaVersion.VERSION_1_8
26+
sourceCompatibility JavaVersion.VERSION_11
27+
targetCompatibility JavaVersion.VERSION_11
2828
}
2929
}
3030

app/src/androidTest/java/de/mide/zweiactivities/ExampleInstrumentedTest.java renamed to app/src/androidTest/java/de/mide/android/zweiactivites/ExampleInstrumentedTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.mide.zweiactivities;
1+
package de.mide.android.zweiactivites;
22

33
import android.content.Context;
44

@@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
2121
public void useAppContext() {
2222
// Context of the app under test.
2323
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24-
assertEquals("de.mide.zweiactivities", appContext.getPackageName());
24+
assertEquals("de.mide.android.zweiactivites", appContext.getPackageName());
2525
}
2626
}

app/src/main/AndroidManifest.xml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
android:installLocation="auto">
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools">
55

66
<application
77
android:allowBackup="true"
@@ -11,22 +11,25 @@
1111
android:label="@string/app_name"
1212
android:roundIcon="@mipmap/ic_launcher_round"
1313
android:supportsRtl="true"
14-
android:theme="@style/Theme.ZweiActivities"
15-
tools:targetApi="31">
16-
17-
<activity
18-
android:name=".Activity2"
19-
android:exported="false" />
14+
android:theme="@style/Theme.ZweiActivites">
2015

2116
<activity
2217
android:name=".Activity1"
2318
android:exported="true">
19+
2420
<intent-filter>
2521
<action android:name="android.intent.action.MAIN" />
2622
<category android:name="android.intent.category.LAUNCHER" />
23+
2724
</intent-filter>
25+
2826
</activity>
2927

28+
29+
<activity
30+
android:name=".Activity2"
31+
android:exported="false" />
32+
3033
</application>
3134

3235
</manifest>

app/src/main/java/de/mide/zweiactivities/Activity1.java renamed to app/src/main/java/de/mide/android/zweiactivites/Activity1.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.mide.zweiactivities;
1+
package de.mide.android.zweiactivites;
22

33
import android.app.Activity;
44
import android.content.Intent;
@@ -16,7 +16,7 @@
1616
* This project is licensed under the terms of the BSD 3-Clause License.
1717
*/
1818
public class Activity1 extends Activity
19-
implements View.OnClickListener {
19+
implements View.OnClickListener {
2020

2121
/** UI-Elemente zur Eingabe von Text durch den Nutzer. */
2222
protected EditText _editText = null;

app/src/main/java/de/mide/zweiactivities/Activity2.java renamed to app/src/main/java/de/mide/android/zweiactivites/Activity2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.mide.zweiactivities;
1+
package de.mide.android.zweiactivites;
22

33
import android.app.Activity;
44
import android.content.Intent;
@@ -17,7 +17,7 @@
1717
* This project is licensed under the terms of the BSD 3-Clause License.
1818
*/
1919
public class Activity2 extends Activity
20-
implements View.OnClickListener {
20+
implements View.OnClickListener {
2121

2222
/** UI-Element zur Anzeige von Text, der auf Activity1 eingegeben wurde. */
2323
protected TextView _textView = null;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
android:layout_height="match_parent"
77
android:background="#FFFF00"
88
android:orientation="vertical"
9+
android:fitsSystemWindows="true"
910
tools:context=".Activity1">
1011

1112
<EditText

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
34
xmlns:tools="http://schemas.android.com/tools"
45
android:layout_width="match_parent"
56
android:layout_height="match_parent"
67
android:background="#8030FF00"
78
android:orientation="vertical"
9+
android:fitsSystemWindows="true"
810
tools:context=".Activity2">
911

1012
<EditText
Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
<resources xmlns:tools="http://schemas.android.com/tools">
22
<!-- Base application theme. -->
3-
<style name="Theme.ZweiActivities" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
4-
<!-- Primary brand color. -->
5-
<item name="colorPrimary">@color/purple_200</item>
6-
<item name="colorPrimaryVariant">@color/purple_700</item>
7-
<item name="colorOnPrimary">@color/black</item>
8-
<!-- Secondary brand color. -->
9-
<item name="colorSecondary">@color/teal_200</item>
10-
<item name="colorSecondaryVariant">@color/teal_200</item>
11-
<item name="colorOnSecondary">@color/black</item>
12-
<!-- Status bar color. -->
13-
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
14-
<!-- Customize your theme here. -->
3+
<style name="Base.Theme.ZweiActivites" parent="Theme.Material3.DayNight.NoActionBar">
4+
<!-- Customize your dark theme here. -->
5+
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
156
</style>
167
</resources>

app/src/main/res/values/colors.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
<color name="purple_200">#FFBB86FC</color>
4-
<color name="purple_500">#FF6200EE</color>
5-
<color name="purple_700">#FF3700B3</color>
6-
<color name="teal_200">#FF03DAC5</color>
7-
<color name="teal_700">#FF018786</color>
83
<color name="black">#FF000000</color>
94
<color name="white">#FFFFFFFF</color>
105
</resources>

app/src/main/res/values/themes.xml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
<resources xmlns:tools="http://schemas.android.com/tools">
22
<!-- Base application theme. -->
3-
<style name="Theme.ZweiActivities" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
4-
<!-- Primary brand color. -->
5-
<item name="colorPrimary">@color/purple_500</item>
6-
<item name="colorPrimaryVariant">@color/purple_700</item>
7-
<item name="colorOnPrimary">@color/white</item>
8-
<!-- Secondary brand color. -->
9-
<item name="colorSecondary">@color/teal_200</item>
10-
<item name="colorSecondaryVariant">@color/teal_700</item>
11-
<item name="colorOnSecondary">@color/black</item>
12-
<!-- Status bar color. -->
13-
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
14-
<!-- Customize your theme here. -->
3+
<style name="Base.Theme.ZweiActivites" parent="Theme.Material3.DayNight.NoActionBar">
4+
<!-- Customize your light theme here. -->
5+
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
156
</style>
7+
8+
<style name="Theme.ZweiActivites" parent="Base.Theme.ZweiActivites" />
169
</resources>

0 commit comments

Comments
 (0)