设置Android应用背景图片或动态壁纸 [英] set android app background to picture or live wallpaper

查看:1403
本文介绍了设置Android应用背景图片或动态壁纸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我告诉我的Flash应用程序在转换为平板电脑。所以,我才刚刚开始在java语言编码。

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...

任何帮助或指向各种教程/资源,我将不得不合并以实现,这将是pciated大大AP $ P $

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

的Jc

推荐答案

有关动态壁纸,你可以只显示用户已全球选定设备(或静态壁纸,如果这是他们选择的)当前的动态壁纸。这是通过设置您的活动Theme.Wallpaper的主题进行。例如,在OnCreate()中做Activity.setTheme(android.R.style.Theme_Wallpaper),或在您的清单中做

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

这篇关于设置Android应用背景图片或动态壁纸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆