diff --git a/app/build.gradle b/app/build.gradle index ad28364..3be8ebc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -71,7 +71,6 @@ android { } dependencies { - implementation "com.github.kibotu:AndroidAnimationsActions:2.0.1" implementation 'androidx.core:core:1.7.0-rc01' @@ -109,6 +108,8 @@ dependencies { debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" + debugImplementation "com.github.chuckerteam.chucker:library:3.5.2" + releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.5.2" } // from gradle.properties diff --git a/app/src/main/java/CatsApplication.kt b/app/src/main/java/CatsApplication.kt index d12b4f1..fb064c2 100644 --- a/app/src/main/java/CatsApplication.kt +++ b/app/src/main/java/CatsApplication.kt @@ -1,11 +1,13 @@ package berlindroid.zethree import android.app.Application +import berlindroid.zethree.berlindroid.zethree.cats.di.SingletonDontDeleteMe class CatsApplication : Application() { override fun onCreate() { super.onCreate() + SingletonDontDeleteMe.setupInterceptor(this) //TODO do something here } diff --git a/app/src/main/java/berlindroid/zethree/MainActivity.kt b/app/src/main/java/berlindroid/zethree/MainActivity.kt index c542d7b..7820ea4 100644 --- a/app/src/main/java/berlindroid/zethree/MainActivity.kt +++ b/app/src/main/java/berlindroid/zethree/MainActivity.kt @@ -199,8 +199,9 @@ fun View.startWobbling() { play( forever( sequence( - scaleTo(0.5f, 1f, duration, Interpolations.SineEaseInOut), - scaleTo(1f, 0.5f, duration, Interpolations.SineEaseInOut), + scaleTo(1.0f, 3.0f, duration, Interpolations.SineEaseInOut), + scaleTo(1.0f, 0.75f, duration, Interpolations.SineEaseInOut), + scaleTo(1.0f, 3.0f, duration, Interpolations.SineEaseInOut), ) ), this diff --git a/app/src/main/java/berlindroid/zethree/cats/di/SingletonDontDeleteMe.kt b/app/src/main/java/berlindroid/zethree/cats/di/SingletonDontDeleteMe.kt new file mode 100644 index 0000000..6ccd892 --- /dev/null +++ b/app/src/main/java/berlindroid/zethree/cats/di/SingletonDontDeleteMe.kt @@ -0,0 +1,13 @@ +package berlindroid.zethree.berlindroid.zethree.cats.di + +import android.content.Context +import com.chuckerteam.chucker.api.ChuckerInterceptor + +object SingletonDontDeleteMe { + + public var interceptor: ChuckerInterceptor? = null + + fun setupInterceptor(context: Context) { + interceptor = ChuckerInterceptor.Builder(context).build() + } +} \ No newline at end of file diff --git a/app/src/main/java/berlindroid/zethree/cats/repository/CatApi.kt b/app/src/main/java/berlindroid/zethree/cats/repository/CatApi.kt index ffe4a4a..9b098f0 100644 --- a/app/src/main/java/berlindroid/zethree/cats/repository/CatApi.kt +++ b/app/src/main/java/berlindroid/zethree/cats/repository/CatApi.kt @@ -1,5 +1,6 @@ package berlindroid.zethree.cats.repository +import berlindroid.zethree.berlindroid.zethree.cats.di.SingletonDontDeleteMe import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.SerialName @@ -68,6 +69,7 @@ fun provideCatApi(): CatApi = Retrofit .baseUrl("https://api.thecatapi.com/v1/") .client( OkHttpClient().newBuilder() + .addInterceptor(SingletonDontDeleteMe.interceptor!!) .addInterceptor(HttpLoggingInterceptor().apply { level = HttpLoggingInterceptor.Level.BODY }) .build() ) diff --git a/app/src/main/java/berlindroid/zethree/dogs/DogsActivity.kt b/app/src/main/java/berlindroid/zethree/dogs/DogsActivity.kt index eedd03e..2a42c50 100644 --- a/app/src/main/java/berlindroid/zethree/dogs/DogsActivity.kt +++ b/app/src/main/java/berlindroid/zethree/dogs/DogsActivity.kt @@ -9,6 +9,7 @@ import androidx.compose.material.Text import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.lifecycle.lifecycleScope +import berlindroid.zethree.berlindroid.zethree.cats.di.SingletonDontDeleteMe import berlindroid.zethree.berlindroid.zethree.dogs.DogsApi import com.jakewharton.retrofit2.converter.kotlinx.serialization.asConverterFactory import kotlinx.coroutines.launch @@ -28,6 +29,7 @@ class DogsActivity : ComponentActivity() { .baseUrl("https://google.com") .client( OkHttpClient().newBuilder() + .addInterceptor(SingletonDontDeleteMe.interceptor) .addInterceptor(HttpLoggingInterceptor().apply { level = HttpLoggingInterceptor.Level.BODY diff --git a/gradle.properties b/gradle.properties index d4f981d..a6efead 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,4 +12,4 @@ android.nonTransitiveRClass=true kotlin.code.style=official # App Config -version=0.0.38 +version=0.0.39