reset the horizontal scroll state at widget previews
This commit is contained in:
parent
c2360a120c
commit
2943b83083
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue