Re: [android-developers] change image onConfigurationChanged

2010-07-13 Thread Martin Obreshkov
If i use setContentView in onConfigurationChanged it works but i have to get all views from layout again. Any other ideas ? On Mon, Jul 12, 2010 at 4:46 PM, Martin Obreshkov wrote: > Nothing happens still the image from portrait view is shown > > > On Mon, Jul 12, 2010 at 4:41 PM, Mark Murphy wro

Re: [android-developers] change image onConfigurationChanged

2010-07-12 Thread Martin Obreshkov
Nothing happens still the image from portrait view is shown On Mon, Jul 12, 2010 at 4:41 PM, Mark Murphy wrote: > On Mon, Jul 12, 2010 at 9:31 AM, Martin Obreshkov > wrote: > > @Override > > public void onConfigurationChanged(Configuration conf) { > > super.onConfigurationChanged(conf); > > > mI

Re: [android-developers] change image onConfigurationChanged

2010-07-12 Thread Mark Murphy
On Mon, Jul 12, 2010 at 9:31 AM, Martin Obreshkov wrote: > @Override > public void onConfigurationChanged(Configuration conf) { > super.onConfigurationChanged(conf); > mImageView.setImageDrawable(getResources().getDrawable(mBackgroundDrawableId)); > } On a whim, try mImageView.setImageResource(mB

Re: [android-developers] change image onConfigurationChanged

2010-07-12 Thread Martin Obreshkov
@Override public void onConfigurationChanged(Configuration conf) { super.onConfigurationChanged(conf); mImageView.setImageDrawable(getResources().getDrawable(mBackgroundDrawableId)); } where mImageView is my ImageView and mBackgroundDrawableId is the id of the current ImageView drawable ( cause th

Re: [android-developers] change image onConfigurationChanged

2010-07-12 Thread Mark Murphy
On Mon, Jul 12, 2010 at 9:18 AM, manigault wrote: > I tried in onConfigurationChanged callback just to set again the image > drawable and hoping will get the correct image but it's still showing > the image for portrait view ( the two images are placed in res/ > drawable and res/drawable-land :)

[android-developers] change image onConfigurationChanged

2010-07-12 Thread manigault
Hi all, I have an activity which handles configuration changes by itself e.g it's not destroyed and recreated every time. But now i have to change one image with another when configuration is changed. The easies way is just to remove android:configChanges attribute from manifest and to let android