android转屏换墙纸的实现
来源:互联网 发布:sql根据身份证算周岁 编辑:程序博客网 时间:2024/04/27 01:02
@Overridepublic void onConfigurationChanged(Configuration newConfig) {// TODO Auto-generated method stub WallpaperManager wpm = (WallpaperManager) this.getSystemService(Context.WALLPAPER_SERVICE); int res_port_id = com.android.launcher.R.drawable.wallpaper_01; int res_land_id = com.android.launcher.R.drawable.wallpaper_02; if(Build.MODEL.equals("ST_P100")) {if(newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){ if (wpm.hasResourceWallpaper(res_land_id)) { try { wpm.setResource(res_port_id); } catch (IOException e) {e.printStackTrace(); } }Log.i("dingchao", "现在是竖屏");}else { if (wpm.hasResourceWallpaper(res_port_id)) { try { wpm.setResource(res_land_id); } catch (IOException e) {e.printStackTrace(); } }Log.i("dingchao", "现在是横屏");}//Intent mIntent = new Intent("android.intent.action.USER_CHANGE_WALLPAPER");//mIntent.putExtra("orientation", newConfig.orientation);//sendBroadcast(mIntent); }super.onConfigurationChanged(newConfig);}
0 0
- android转屏换墙纸的实现
- Android照片墙纸实现
- android-修改默认墙纸
- android 墙纸修改
- android-修改默认墙纸
- android 获得墙纸
- Android源码中添加Livewallpapers(动态墙纸)的支持
- Android:设置默认墙纸为自己Activity的背景
- Android中当前墙纸Wallpaper存放的位置
- Android MTK 锁屏图片和背景墙纸的修改
- windows7墙纸的位置?
- Android原理之动态墙纸
- 高质量的Ubuntu墙纸
- [电源、屏保、闹钟、日程、墙纸] UILocalNotification实现本地的闹钟提醒的方法。
- [电源、屏保、闹钟、日程、墙纸] UILocalNotification实现本地的闹钟提醒的方法。
- 用C#实现动态桌面墙纸(转)
- 谷歌暂停部分Android墙纸应用程序
- Android原理揭秘系列之动态墙纸
- 键盘事件控制光标向左向右<input >
- php中jsonp的跨域实例
- PHP哈希算法设计
- Java中的IO流系统详解
- 使用$.getJSON实现跨域ajax请求
- android转屏换墙纸的实现
- 第三次训练——Power of Cryptography
- android颜色表
- csdn上传图片水印测试
- 哈希碰撞攻击
- uva 11627 - Slalom(贪心+二分)
- 第三次训练——Secret Research
- Python中re(正则表达式)模块学习
- SSH架构中DAO泛型 出现的问题