Widget not working properly when changing orientation

Put your problem here if it does not fit any of the other categories.

Widget not working properly when changing orientation

Postby bhushan.kasturiwale » Mon Aug 17, 2009 7:11 am

Hello ,

I am working on the Android AppWidgetProvider . The widget is working properly.
But if change the orientation of the emulator then the onUpdate() method is not called.
I am not able to launch the memo when I change the potrait mode.
I am not able to call it manually as I am not getting any event for the Orientation change.
Please let me know what can be done for it.

Hello plusminus I am great fan of yours.
The answers which you give help us a lot.
Thanks plusminus for that.
bhushan.kasturiwale
Freshman
Freshman
 
Posts: 4
Joined: Mon May 25, 2009 12:35 pm

Top

Postby shialesh » Mon Aug 17, 2009 1:20 pm

int orientation = getWindowManager().getDefaultDisplay().getOrientation();

this will give 1 or 0 according to the orientation and you can manage your code according to that value.
shialesh
Freshman
Freshman
 
Posts: 9
Joined: Thu Jul 30, 2009 11:11 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Majestic-12 [Bot], Yahoo [Bot] and 16 guests