diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/adapters/WidgetsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/adapters/WidgetsAdapter.kt index 8b2399b..4cf4af1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/adapters/WidgetsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/adapters/WidgetsAdapter.kt @@ -64,6 +64,7 @@ class WidgetsAdapter( private fun setupListItemsHolder(view: View, listItem: WidgetsListItemsHolder) { view.widget_list_items_holder.removeAllViews() + view.widget_list_items_scroll_view.scrollX = 0 listItem.widgets.forEachIndexed { index, widget -> val imageSize = activity.resources.getDimension(R.dimen.widget_preview_size).toInt() val widgetPreview = LayoutInflater.from(activity).inflate(R.layout.item_widget_preview, null) as ImageView diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/models/AppWidget.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/models/AppWidget.kt index e27a370..356afc1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/models/AppWidget.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/models/AppWidget.kt @@ -2,5 +2,12 @@ package com.simplemobiletools.launcher.models import android.graphics.drawable.Drawable -data class AppWidget(var appPackageName: String, var appTitle: String, val appIcon: Drawable, val widgetTitle: String, val widgetPreviewImage: Drawable?, var width: Int, val height: Int) : - WidgetsListItem() +data class AppWidget( + var appPackageName: String, + var appTitle: String, + val appIcon: Drawable, + val widgetTitle: String, + val widgetPreviewImage: Drawable?, + var width: Int, + val height: Int +) : WidgetsListItem()