Gulfam,

This is kind of non-obvious to get right, although really pretty simple.

When home screen orientation is changed (is this a Moto Droid / Milestone, by any chance?) Android uses the most recent RemoveViews object to recreate widgets, since there is no onCreate() equivalent.

If the most recent update for your widget only specified a text or image change, and didn't include PendingIntents for clicks, then the widget will stop responding to clicks, or misbehave in other ways.

The trick is that each and every RemoteViews has to specify complete widget state - including all the PendingIntents, text item and image item changes, etc...

-- Kostya

05.07.2010 19:18, Gulfam пишет:
Hi Mark thanks for your reply,

I have developed a home screen widget.its working fine. When i touch
items on widget like ImageViews and TextViews its open the main
"Activity" of my application, but when the orientation of phone
changes from portrait to landscape, and land scape to portrait, it
stops responding to touch events, and NOT opening main "Activity" of
my applicaton. How I Can Resolve this issue?????

Any Solution???????

Regards,
Gulfam Hassan



On Jul 5, 3:59 pm, Mark Murphy<mmur...@commonsware.com>  wrote:
On Mon, Jul 5, 2010 at 5:13 AM, Gulfam<gulfa...@gmail.com>  wrote:
I want to force App Widget in portrait mode, as we force our activity
in portrait mode by adding this attribute in Menifest file
android:screenOrientation = "portrait".
is there any way to force App Widget in portrait mode??????????
Not that I am aware of, sorry. Bear in mind that not all home screen
implementations change orientation.

--
Mark Murphy (a Commons 
Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

Android Consulting:http://commonsware.com/consulting


--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to