Re: [android-developers] Re: Handling Orientation Changes that occur in another Activity

2010-06-03 Thread Jeff Thorn
I have not defined these settings. I just want the WebView to fill the
entire screen. Until the camera is launched, the default layout and scaling
settings work just fine.

It looks like somewhere the Scale setting gets changed from 1.5 to 1.0 after
I call WebView.restoreState(). I don't want to hard code anything so I am
not sure of the best way to change it back.


On Thu, Jun 3, 2010 at 9:51 AM, greg sep...@eduneer.com wrote:

 You didn't mention if you've defined separate layout-land and layout-
 port for your activity.

 On Jun 3, 9:11 am, Jeff jeff.th...@gmail.com wrote:
  I am having an interesting problem and would appreciate any advice. My
  app uses WebView as its primary view. Using a javascript hook, it can
  launch the camera so the user can take a picture. The camera is
  launched using
 
  Intent i = new
  Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
 
  When the camera starts, it makes sense to use landscape mode, so the
  user naturally turns the phone on its side. After the user takes a
  picture, control returns to my launching Activity (actually, my
  Acitivity gets restarted because it usually gets destroyed to free up
  memory for the camera on my Moto Droid). When my WebView gets
  recreated, I restore its state from the Bundle I saved in
  onSaveInstanceState().
 
  Now everything looks ok, except the phone is still in landscape mode.
  However, when the user turns the phone upright bringing back into
  portrait mode, my WebView takes up only half of the screen. Somewhere
  along the way, the scale of my WebView got lost. This seems like such
  a minor issue, but it is driving me crazy.
 
  Does anyone have an idea why this might be happening? What is the
  correct way to preserve the scale of my WebView? I am hesitant to hard
  code any scale factors because what looks good on my device may not be
  the same for another.
 
  Thanks,
  Jeff

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 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 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

Re: [android-developers] Re: Handling Orientation Changes that occur in another Activity

2010-06-03 Thread peeyush varshney
Hi Jeff,

Whenever you change the configuration of device. you ll get
onConfigurationChanged() call madatory. there you need to change the layout
if you define different layout for landscape and portrait mode else system
will take care.
No need for onConfigurationChanged().



On Thu, Jun 3, 2010 at 7:26 PM, Jeff Thorn jeff.th...@gmail.com wrote:

 I have not defined these settings. I just want the WebView to fill the
 entire screen. Until the camera is launched, the default layout and scaling
 settings work just fine.

 It looks like somewhere the Scale setting gets changed from 1.5 to 1.0
 after I call WebView.restoreState(). I don't want to hard code anything so I
 am not sure of the best way to change it back.


 On Thu, Jun 3, 2010 at 9:51 AM, greg sep...@eduneer.com wrote:

 You didn't mention if you've defined separate layout-land and layout-
 port for your activity.

 On Jun 3, 9:11 am, Jeff jeff.th...@gmail.com wrote:
  I am having an interesting problem and would appreciate any advice. My
  app uses WebView as its primary view. Using a javascript hook, it can
  launch the camera so the user can take a picture. The camera is
  launched using
 
  Intent i = new
  Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
 
  When the camera starts, it makes sense to use landscape mode, so the
  user naturally turns the phone on its side. After the user takes a
  picture, control returns to my launching Activity (actually, my
  Acitivity gets restarted because it usually gets destroyed to free up
  memory for the camera on my Moto Droid). When my WebView gets
  recreated, I restore its state from the Bundle I saved in
  onSaveInstanceState().
 
  Now everything looks ok, except the phone is still in landscape mode.
  However, when the user turns the phone upright bringing back into
  portrait mode, my WebView takes up only half of the screen. Somewhere
  along the way, the scale of my WebView got lost. This seems like such
  a minor issue, but it is driving me crazy.
 
  Does anyone have an idea why this might be happening? What is the
  correct way to preserve the scale of my WebView? I am hesitant to hard
  code any scale factors because what looks good on my device may not be
  the same for another.
 
  Thanks,
  Jeff

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 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 post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thank  Regards
Peeyush Varshney

-- 
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