diff --git a/app/src/main/java/foundation/e/apps/applicationlist/ApplicationListRVAdapter.kt b/app/src/main/java/foundation/e/apps/applicationlist/ApplicationListRVAdapter.kt index 0c45331ab4139eca842286c82b20697c37efd279..e98783e434be1d72910954d2ec7ba2688d06b400 100644 --- a/app/src/main/java/foundation/e/apps/applicationlist/ApplicationListRVAdapter.kt +++ b/app/src/main/java/foundation/e/apps/applicationlist/ApplicationListRVAdapter.kt @@ -133,6 +133,8 @@ class ApplicationListRVAdapter( setAppIcon(searchApp, shimmerDrawable) removeIsPurchasedObserver(holder) + setInstallButtonDimensions(view) + if (appInfoFetchViewModel.isAppInBlockedList(searchApp)) { setupShowMoreButton() } else { @@ -145,6 +147,16 @@ class ApplicationListRVAdapter( } } + private fun ApplicationListItemBinding.setInstallButtonDimensions(item: View) { + item.post { + val maxAllowedWidth = item.measuredWidth / 2 + installButton.apply { + if (width > maxAllowedWidth) + width = maxAllowedWidth + } + } + } + private fun ApplicationListItemBinding.setAppIcon( searchApp: FusedApp, shimmerDrawable: ShimmerDrawable diff --git a/app/src/main/java/foundation/e/apps/search/SearchFragment.kt b/app/src/main/java/foundation/e/apps/search/SearchFragment.kt index aaa3faa172968f44014c931d97402ce3d83ec44c..7d422c0b9e7d75336f5b1b64dcaf47a5ea25d756 100644 --- a/app/src/main/java/foundation/e/apps/search/SearchFragment.kt +++ b/app/src/main/java/foundation/e/apps/search/SearchFragment.kt @@ -61,7 +61,6 @@ import foundation.e.apps.utils.exceptions.GPlayLoginException import foundation.e.apps.utils.modules.PWAManagerModule import foundation.e.apps.utils.parentFragment.TimeoutFragment import kotlinx.coroutines.launch -import timber.log.Timber import javax.inject.Inject @AndroidEntryPoint diff --git a/app/src/main/res/layout/application_list_item.xml b/app/src/main/res/layout/application_list_item.xml index c73e70a811ca049474edecde5884225eee718087..bf6f7ef8c8670d687ed374648ca85d1bfcfe6518 100644 --- a/app/src/main/res/layout/application_list_item.xml +++ b/app/src/main/res/layout/application_list_item.xml @@ -129,7 +129,7 @@