-
1 votesanswersviews
如何在WallpaperService上重用SurfaceHolder,
如何在 WallpaperService 上重用 SurfaceHolder , 我想在WallpaperService上将内容循环切换到Surface . 1.“播放电影”,2 . “画一幅画”,3 . “播放电影” 这行得通 . 1. playPlayer()2 . playImage() . 发生错误 . 1. playPlayer()2 . playImage()3 . playPl... -
0 votesanswersviews
如果曲面不在前景中,SurfaceHolder.lockCanvas将返回null
我目前正在使用Android中的LiveWallpaper进行测试 . 我在画布上使用看起来像这样的代码绘制一些东西: final SurfaceHolder holder = getSurfaceHolder(); Canvas c = new Canvas(); c = holder.lockCanvas(); // c becomes null c.save(); c.drawBitmap(... -
-2 votesanswersviews
onSurfaceChanged(SurfaceHolder holder,int format,int width,int height)VS onVisibilityChanged(boolean visible)
由于我是动态壁纸开发的新手,我很难知道动态壁纸中的 onSurfaceChanged (SurfaceHolder holder, int format, int width, int height) VS onVisibilityChanged(boolean visible) 之间的区别,当它们被调用时以及它们在移动屏幕上受影响时,任何人都可以区分这两种方法.... -
0 votesanswersviews
触摸Android动态壁纸时打开对话框
当点击动态壁纸时,我想打开一个包含一些简单信息的对话框 . 在Android动态壁纸中覆盖onCommand,并且几乎直接从Android文档中添加自定义对话框(未显示布局info_dialog.xml): @Override public Bundle onCommand (String action, int x, int y, int z, Bundle extras, boolean re... -
1 votesanswersviews
使用rajawali在动态壁纸中创建移动背景
我正在使用rajawali创建一个动态壁纸 . 我在其上加载一个对象(使用此代码:Rajawali object rotation match to camera),现在我想在后台设置运动图像 . 有人给我建议吗? -
0 votesanswersviews
如何停止和恢复我实现的ApplicationListener类?
我有类WallpaperAndDream实现ApplicationListener . 全部由ligdx实现(动态壁纸和白日梦) . 以下是创建和呈现的方法: public void create() { camera = new OrthographicCamera(width, height); camera.position.set(width / 2, height / 2... -
0 votesanswersviews
Nullpointer到SurfaceHolder动态壁纸
嘿家伙,我的动态壁纸有这个错误 . 出于某种原因,当我尝试设置表面类型时,我得到一个NullPointerException错误 . 我不知道那里发生了什么 . 提前致谢 . 错误似乎在 SeType() 方法中 . 这是我的代码: import android.content.res.Configuration; import android.content.res.Resources; imp... -
1 votesanswersviews
SurfaceHolder:IllegalStateException - Surface未锁定[关闭]
我的程序中出错了 . 错误似乎表明我的表面没有锁定,当我尝试在我的绘制序列结束时解锁它 . 但如下面的代码所示 . 我首先锁定了表面 . 为什么我收到此错误 . 我做错了什么? 给出错误的方法: 错误行' **this.holder.unlockCanvasAndPost(canvas);** ' public void run() { while (this.drawFlag) ... -
1 votesanswersviews
Android - 在WallpaperService中实现安全性
我正在使用WallpaperService类在设备上设置动态壁纸 . 我想在系统屏幕上实现安全性(以防止屏幕截图或录制),其中“设置壁纸”按钮由android系统显示 . 到目前为止,我找到了一个SurfaceView类的方法 - surfaceview.setSecure(boolean value) 但是,我无法在我的类中获得SurfaceView的实例 . 请建议一些解决方法来获取此类的实...