ok I have solved my issue
I kept the android:configChanges="orientation" setting so
as to prevent webview from reloading.
While for the image view
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
if(newConfig.orientation==1) //portrait
{
ImageView iv =
(ImageView)findViewById(R.id.ImageView01);
iv.setImageResource(R.drawable.xyz);
}
else //landscape
{
ImageView iv =
(ImageView)findViewById(R.id.ImageView01);
iv.setImageResource(R.drawable.xyzlandscape);
}
}
On Jun 16, 4:32 pm, nikhil <[email protected]> wrote:
> Can you give me some pointers on how to change the images according to
> the orientation?
>
> My problem is I have webview and imageview on same layout, I wish to
> stop webview from reloading and adjust the imageview with landscape
> and portrait images.
>
> I am not able to achieve this both.
>
> On Jun 16, 12:27 pm, "Maps.Huge.Info (Maps API Guru)"
>
> <[email protected]> wrote:
> > If you change the default behavior of your app with the configChanges,
> > then you just have to handle the loading of a different resource
> > yourself. Also, don't forget to handle the keyboard as well.
>
> > -John Coryat
--
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