android设置主题背景为壁纸,设置Android应用背景图片或动态壁纸

I was recently told to convert my flash app over to a tablet. So I only just started coding in the java language.

I am going to have a default picture set as the background. However, if the user wishes they would be able to change the the background to a picture contained on their tablet. So it would change the background at that point and load it at that point when started next time. If they later delete the picture, it would go back to the default.

To top it off, my boss who knows nothing of coding thinks it would be easy for me to "allow those cool live backgrounds in a similar fashion" ... As if learning a new programming language was not difficult enough...

Any help or pointing to various tutorials/resources that I would have to merge to effectuate this would be greatly appreciated

Jc

解决方案

For live wallpapers, you can only show the current live wallpaper that the user has global selected for the device (or static wallpaper if that is what they selected). This is done by setting the theme of your activity to Theme.Wallpaper. For example, in onCreate() do Activity.setTheme(android.R.style.Theme_Wallpaper) or doing in your manifest

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值