0

I´ve developed an android application with it´s own widget.

To bring the widget in the right form, I set minWidth to 300dp and minHeight to 400 dp.

When placing it to the homescreen, it has the right dimensions, but anyway, it´s possible to resize it into any form you want, even 1x1 cells, which should be prevented by setting minWidth and minHeight.

How could you make the widget non-resizable?

Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136

1 Answers1

0

in your widget properties, set android:resizeMode="none"

Example:

<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:initialLayout="@layout/widget_layout"
    android:minHeight="72dp"
    android:minWidth="72dp"
    android:previewImage="@drawable/widget_preview"
    android:resizeMode="none"
    android:updatePeriodMillis="60000" >
</appwidget-provider>
Jarvis
  • 1,527
  • 12
  • 17