欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android設(shè)置桌面背景圖片的實(shí)現(xiàn)方法

 更新時(shí)間:2013年06月06日 00:47:32   作者:  
有時(shí)候我們需要用android設(shè)置桌面背景圖片,這里簡(jiǎn)單分享下,方便需要的朋友
1.設(shè)置桌面背景圖片的方法

復(fù)制代碼 代碼如下:

Resources res=getResources();
BitmapDrawable bmpDraw=(BitmapDrawable)res.getDrawable(R.drawable.icon);
Bitmap bmp=bmpDraw.getBitmap();
try{
setWallpaper(bmp);
}catch(IOException e) {
e.printStackTrace();
}


2.在manifest中增加設(shè)置桌面的權(quán)限

<uses-permission android:name="android.permission.SET_WALLPAPER" />

相關(guān)文章

最新評(píng)論