diff --git a/app/build.gradle b/app/build.gradle index 65e9efd..18ab5b1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,6 +18,9 @@ android { targetSdkVersion 34 versionCode versionMajor * 100 + versionMinor * 10 + versionPatch versionName "${versionMajor}.${versionMinor}.${versionPatch}" + vectorDrawables { + useSupportLibrary true + } } buildTypes { @@ -35,6 +38,17 @@ android { kotlinOptions { jvmTarget = JavaVersion.VERSION_19 } + buildFeatures { + compose true + } + composeOptions { + kotlinCompilerExtensionVersion '1.5.1' + } + packaging { + resources { + excludes += '/META-INF/{AL2.0,LGPL2.1}' + } + } } dependencies { @@ -50,5 +64,16 @@ dependencies { implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' implementation 'androidx.wear:wear:1.3.0' + implementation platform('androidx.compose:compose-bom:2023.08.00') + implementation 'androidx.compose.ui:ui' + implementation 'androidx.compose.ui:ui-tooling-preview' + implementation 'androidx.wear.compose:compose-material:1.2.1' + implementation 'androidx.wear.compose:compose-foundation:1.2.1' + implementation 'androidx.activity:activity-compose:1.7.2' + implementation 'androidx.core:core-splashscreen:1.0.1' + androidTestImplementation platform('androidx.compose:compose-bom:2023.08.00') + androidTestImplementation 'androidx.compose.ui:ui-test-junit4' compileOnly 'com.google.android.wearable:wearable:2.9.0' + debugImplementation 'androidx.compose.ui:ui-tooling' + debugImplementation 'androidx.compose.ui:ui-test-manifest' } diff --git a/app/lint.xml b/app/lint.xml new file mode 100644 index 0000000..44fac75 --- /dev/null +++ b/app/lint.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5abf1e0..bc42bdf 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -13,11 +13,11 @@ + android:theme="@android:style/Theme.DeviceDefault"> @@ -30,15 +30,28 @@ android:name="com.google.android.wearable.standalone" android:value="true" /> + + + + + + + - + android:label="Launcher Settings" + android:taskAffinity="com.agronick.launchersettings.presentation.LauncherSettings" + android:theme="@style/AppTheme"> @@ -48,10 +61,10 @@ + android:theme="@style/Theme.Wearable.Modal"> diff --git a/app/src/main/java/com/agronick/launcher/presentation/BackToClock.kt b/app/src/main/java/com/agronick/launcher/presentation/BackToClock.kt new file mode 100644 index 0000000..fafcade --- /dev/null +++ b/app/src/main/java/com/agronick/launcher/presentation/BackToClock.kt @@ -0,0 +1,20 @@ + +package com.agronick.launcher.presentation + +import android.content.Intent +import android.os.Bundle +import androidx.activity.ComponentActivity + + +class BackToClock : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + + super.onCreate(savedInstanceState) + val i = Intent(Intent.ACTION_MAIN) + i.addCategory(Intent.CATEGORY_HOME) + startActivity(i) + + finish() + } +} + diff --git a/app/src/main/res/mipmap-hdpi/clock.png b/app/src/main/res/mipmap-hdpi/clock.png new file mode 100644 index 0000000..9a821c0 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/clock.png differ diff --git a/app/src/main/res/mipmap-mdpi/clock.png b/app/src/main/res/mipmap-mdpi/clock.png new file mode 100644 index 0000000..02ddd75 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/clock.png differ diff --git a/app/src/main/res/mipmap-xhdpi/clock.png b/app/src/main/res/mipmap-xhdpi/clock.png new file mode 100644 index 0000000..e726c00 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/clock.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/clock.png b/app/src/main/res/mipmap-xxhdpi/clock.png new file mode 100644 index 0000000..a4af4b0 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/clock.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/clock.png b/app/src/main/res/mipmap-xxxhdpi/clock.png new file mode 100644 index 0000000..8204f78 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/clock.png differ diff --git a/app/src/main/res/values-round/strings.xml b/app/src/main/res/values-round/strings.xml index 7abc06d..768822f 100644 --- a/app/src/main/res/values-round/strings.xml +++ b/app/src/main/res/values-round/strings.xml @@ -1 +1,3 @@ - + + From the Round world,\nHello, %1$s! + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index dbf2642..878d20f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -5,4 +5,10 @@ values-round/strings.xml for round devices. --> Max rows + BackToClock + + From the Square world,\nHello, %1$s! \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 8f6c035..b96a241 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -7,6 +7,7 @@ #7842f5 #121212 #b1bbc9 + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3d0b0e3..6b47acb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.9.21' + ext.kotlin_version = '1.9.0' repositories { google() mavenCentral()