allow resizing the widget to a smaller size

This commit is contained in:
tibbi 2020-05-24 23:08:08 +02:00
parent 0204369302
commit 288c9c6318
3 changed files with 12 additions and 9 deletions

View File

@ -1,6 +1,6 @@
<resources>
<dimen name="min_widget_width">320dp</dimen>
<dimen name="min_widget_height">320dp</dimen>
<dimen name="initial_widget_width">320dp</dimen>
<dimen name="initial_widget_height">320dp</dimen>
<dimen name="button_text_size">42sp</dimen>
<dimen name="formula_text_size">30sp</dimen>

View File

@ -1,6 +1,8 @@
<resources>
<dimen name="min_widget_width">250dp</dimen>
<dimen name="min_widget_height">250dp</dimen>
<dimen name="initial_widget_width">250dp</dimen>
<dimen name="initial_widget_height">250dp</dimen>
<dimen name="min_widget_width">180dp</dimen>
<dimen name="min_widget_height">180dp</dimen>
<dimen name="button_text_size">28sp</dimen>
<dimen name="formula_text_size">20sp</dimen>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:configure="com.simplemobiletools.calculator.activities.WidgetConfigureActivity"
android:initialLayout="@layout/activity_main"
android:minHeight="@dimen/min_widget_height"
android:minWidth="@dimen/min_widget_width"
android:minWidth="@dimen/initial_widget_width"
android:minHeight="@dimen/initial_widget_height"
android:minResizeWidth="@dimen/min_widget_width"
android:minResizeHeight="@dimen/min_widget_height"
android:previewImage="@drawable/img_widget_preview"
android:resizeMode="horizontal|vertical"
android:updatePeriodMillis="36000000"/>
android:updatePeriodMillis="36000000" />