0

I made an application to set wallpaper and worked great! The problem is that I changed the Manifest to this:

android:theme="@android:style/Theme.Dialog"

And now the application changes the wallpaper but the home screen doesn't refresh. If I slide my finger on the phone and refresh the homescreen then the wallpaper refreshes and appears my picture.
In simulator it works fine.
My phone is Samsung Galaxy SCL.
the code I use is this one:

WallpaperManager wpm;
wpm = WallpaperManager.getInstance(getApplicationContext());
Bitmap bm1, bm2;       
bm1 = BitmapFactory.decodeFile(--file path .png--);
bm2 = Bitmap.createScaledBitmap(bmFondo, 960, 800, false);
wpm.setBitmap(bm2);  

The app works well if I don't use Theme.Dialog

assylias
  • 321,522
  • 82
  • 660
  • 783
Ton
  • 9,235
  • 15
  • 59
  • 103

1 Answers1

0

Try to redraw wallpaper. Or try to create your own theme which will looks like dialog theme.

Martin Vandzura
  • 3,047
  • 1
  • 31
  • 63
  • Can I force android to redraw/reload the home screen? – Ton May 01 '12 at 16:31
  • I checked docs but I didn't saw. Check out WallpaperManager api docs. There is getDrawable so maybe it will works. Try some methods from walpaper manager. Maybe clear() method before you add new walpaper. – Martin Vandzura May 02 '12 at 12:06