diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8c2f03f..84e56e2 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -45,8 +45,8 @@ dependencies { testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) - implementation("com.github.chinhdl891:Image-Compare:102") +// implementation("com.github.chinhdl891:Image-Compare:102") -// implementation(project(":mylibrary")) + implementation(project(":mylibrary")) // implementation("com.github.chinhdl891:ImageSildeCompare:v1.0.2") } \ No newline at end of file diff --git a/mylibrary/build.gradle.kts b/mylibrary/build.gradle.kts index 630e8c9..52f9d9a 100644 --- a/mylibrary/build.gradle.kts +++ b/mylibrary/build.gradle.kts @@ -43,7 +43,7 @@ publishing { register("release") { groupId = "com.github.chinhdl891" artifactId = "ImageSildeCompare" - version = "1.0.2" + version = "1.0.3" afterEvaluate { from(components["release"]) diff --git a/mylibrary/src/main/java/com/chinchin/image/compare/ImageCompareSlider.kt b/mylibrary/src/main/java/com/chinchin/image/compare/ImageCompareSlider.kt index 1428b96..fb2b6d8 100644 --- a/mylibrary/src/main/java/com/chinchin/image/compare/ImageCompareSlider.kt +++ b/mylibrary/src/main/java/com/chinchin/image/compare/ImageCompareSlider.kt @@ -83,13 +83,15 @@ class ImageCompareSlider @JvmOverloads constructor( } - fun setUpSlideCompare(backgroundData: Any) { + fun setUpSlideCompare(backgroundData: Bitmap) { - val backgroundBitmap = backgroundData as Bitmap - val resizedBackgroundBitmap = resizeBitmapToFitScreenWidth(backgroundBitmap) + val resizedBackgroundBitmap = resizeBitmapToFitScreenWidth(backgroundData) binding.backgroundImage.setImageBitmap(resizedBackgroundBitmap) - val foregroundBitmap = createTransparentBitmap(backgroundBitmap.width, backgroundBitmap.height) + val foregroundBitmap = createTransparentBitmap( + backgroundData.width, + backgroundData.height + ) val resizedForegroundBitmap = resizeBitmapToFitScreenWidth(foregroundBitmap) binding.foregroundImage.setImageBitmap(resizedForegroundBitmap) diff --git a/settings.gradle.kts b/settings.gradle.kts index 5275a33..bbb7757 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,6 +23,6 @@ dependencyResolutionManagement { } -rootProject.name = "My Application" +rootProject.name = "Image Compare" include(":app") include(":mylibrary")