[android-developers] Digest for android-developers@googlegroups.com - 1 update in 1 topic

BArtWell <bazhanov.artem@gmail.com>: Jan 25 03:59AM -0800

I need to make a widget with size 4x1 cells. Here is my code:
<appwidget-provider xmlns:android=
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 digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

No comments:

Post a Comment