2010-07-08 108 views

回答

4
Bitmap o = BitmapFactory.decodeFile("/sdcard/wallpapers/olive.jpg"); 

try { 
    wallpaperManager.setBitmap(o); 
    finish(); 
} 
catch (IOException e) { 
    e.printStackTrace(); 
} 

即:

try { 
    wallpaperManager.setResource("/sdcard/wallpaper/olive.jpg"); 
    finish(); 
} catch(IOException e) { 
    e.printStackTrace(); 
} 

没有奏效,返回错误