show the widget resolution under the title

This commit is contained in:
tibbi 2022-09-16 10:20:32 +02:00
parent 08de22c3c9
commit 3e79d22fbb
2 changed files with 19 additions and 1 deletions

View file

@ -81,6 +81,11 @@ class WidgetsAdapter(
setTextColor(textColor)
}
widgetPreview.widget_size.apply {
text = "${widget.widthTiles} x ${widget.heightTiles}"
setTextColor(textColor)
}
(widgetPreview.widget_image.layoutParams as RelativeLayout.LayoutParams).apply {
marginStart = activity.resources.getDimension(R.dimen.activity_margin).toInt()
marginEnd = endMargin

View file

@ -4,7 +4,7 @@
android:id="@+id/widget_preview_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/normal_margin">
android:paddingBottom="@dimen/activity_margin">
<ImageView
android:id="@+id/widget_image"
@ -30,4 +30,17 @@
android:textSize="@dimen/smaller_text_size"
tools:text="Calendar" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/widget_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/widget_title"
android:layout_alignStart="@+id/widget_image"
android:layout_alignEnd="@+id/widget_image"
android:alpha="0.5"
android:ellipsize="end"
android:lines="1"
android:textSize="@dimen/smaller_text_size"
tools:text="1 x 1" />
</RelativeLayout>