Skip to content

Commit

Permalink
feat: updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
agronick committed Dec 15, 2023
1 parent 48b19b8 commit bb6c60e
Show file tree
Hide file tree
Showing 18 changed files with 277 additions and 175 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
compileSdkVersion 34
buildToolsVersion "30.0.3"
namespace = "com.agronick.launcher"

defaultConfig {
applicationId "com.agronick.launcher"
minSdkVersion 28
targetSdkVersion 29
targetSdkVersion 34
versionCode 1
versionName "1.0"

Expand All @@ -35,13 +35,14 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'com.google.android.support:wearable:2.8.1'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'com.google.android.support:wearable:2.9.0'
implementation 'com.google.android.gms:play-services-wearable:18.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.jakewharton.timber:timber:5.0.1'

implementation 'androidx.wear:wear:1.1.0'
compileOnly 'com.google.android.wearable:wearable:2.8.1'
implementation 'androidx.wear:wear:1.3.0'
compileOnly 'com.google.android.wearable:wearable:2.9.0'
}
5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.Wearable.Modal">
android:theme="@style/Theme.Wearable.Modal"
android:exported="true"
android:taskAffinity="com.agronick.launcher">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
15 changes: 7 additions & 8 deletions app/src/main/java/com/agronick/launcher/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import android.transition.Fade
import android.view.Window


var TAG = "main"

class MainActivity : Activity() {
private lateinit var mainView: MainView

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
with(window) {
Expand All @@ -35,12 +33,13 @@ class MainActivity : Activity() {

fun onPackageClick(pkg: PInfo) {
val name = ComponentName(pkg.pname, pkg.activityName)
val i = Intent(Intent.ACTION_MAIN)
i.addCategory(Intent.CATEGORY_LAUNCHER)
i.flags = Intent.FLAG_ACTIVITY_NEW_TASK or
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
i.component = name
startActivity(i)
with(Intent(Intent.ACTION_MAIN)) {
addCategory(Intent.CATEGORY_LAUNCHER)
flags = Intent.FLAG_ACTIVITY_NEW_TASK or
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
component = name
startActivity(this)
}
}

private fun getInstalledApps(): List<PInfo> {
Expand Down
24 changes: 10 additions & 14 deletions app/src/main/java/com/agronick/launcher/MainView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import android.animation.AnimatorSet
import android.animation.ValueAnimator
import android.content.Context
import android.graphics.Canvas
import android.util.Log
import android.view.MotionEvent
import android.view.View
import androidx.core.animation.doOnEnd
import timber.log.Timber

class MainView(context: Context, appList: List<PInfo>) : View(context) {
init {
Expand Down Expand Up @@ -95,7 +95,7 @@ class MainView(context: Context, appList: List<PInfo>) : View(context) {
.apply {
addUpdateListener { animator ->
app.size = ((animator.animatedValue as Float).toInt())
Log.d(TAG, "At size ${app.size}")
Timber.d("At size ${app.size}")
container.lastCircle?.let { app.prepare(it) }
invalidate()
}
Expand Down Expand Up @@ -133,19 +133,15 @@ class MainView(context: Context, appList: List<PInfo>) : View(context) {
}.run()
}

override fun onDraw(canvas: Canvas?) {
Log.d(
TAG,
override fun onDraw(canvas: Canvas) {
Timber.d(
"draw called $offsetLeft $offsetTop"
)
if (canvas == null) return
Runnable {
val offset = getOffset()
if (offset != null) {
canvas.translate(offset.first, offset.second)
container.draw(canvas)
openingApp?.drawNormal(canvas)
}
}.run()
val offset = getOffset()
if (offset != null) {
canvas.translate(offset.first, offset.second)
container.draw(canvas)
openingApp?.drawNormal(canvas)
}
}
}
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.3.72"
ext.kotlin_version = '1.9.21'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.2"
classpath "com.android.tools.build:gradle:8.2.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -17,10 +17,10 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Feb 06 14:50:12 EST 2021
#Fri Dec 15 09:53:45 EST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Loading

0 comments on commit bb6c60e

Please sign in to comment.