I need to make a widget with size 4x1 cells. Here is my code:
<appwidget-provider xmlns:android=
"http://schemas.android.com/apk/res/android"
android:minWidth="250dp"
android:minHeight="40dip"
android:updatePeriodMillis="0"
android:initialLayout="@layout/widget"
android:configure="ru.bartwell.myapp.WidgetActivity" />
I test it on two virtual devices in Genymotion:
1. Google Nexus 7, 800x1280, Android 4.4.4
2. Samsung Galaxy S5, 1080x1920, Android 4.4.4
And I get different results:
When android:minWidth="250dp" and android:minHeight="40dip" (new formula):
1. Google Nexus 7 - 3x1 cells
2. Samsung Galaxy S5 - 4x1
When android:minWidth="292dp" and android:minHeight="70dip" (old formula):
1. Google Nexus 7 - 4x1
2. Samsung Galaxy S5 - 4x2
As I see widget size depends of screen resolution. But I just need to get
4x1 widget's size on all devices. How to correctly setup widget size?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.