Reputation: 196
I am letting users add widgets to my screen using pick widgets option. I want to give an option for user to resize them. That is, after long press on the widget, a boundary box should appear and user can resize the widget by dragging the boundaries. Can someone let me know how this can be achieved for widgets that are added using pick widget option. Thanks.
Upvotes: 2
Views: 1512
Reputation: 88
It was better that you show us your codes but you can use this codes: first if you want to add your boundary box around your widget, you should add this line to your xml:
android:resizeMode="horizontal|vertical"
and if you add minimum resize size code to your widget, it will let user to resize it, add this code to your xml too:
android:minResizeWidth
go and see this code sample and read xml code in res folder: link
Upvotes: 3