当 TextInput 失去焦点时,我的 Android AIR 应用程序显示白屏 [英] My Android AIR app shows white screen when TextInput loses focus

查看:24
本文介绍了当 TextInput 失去焦点时,我的 Android AIR 应用程序显示白屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这几乎是问题的总结.我在 FlashDevelop 中有一个 AIR Mobile Flex App 项目,它使用视图来显示内容.一切正常,我可以将 TextInput 或 TextArea 添加到舞台,选择它(然后显示软键盘),输入一些文本.但是当我按 Enter 键或将焦点更改到其他元素以隐藏键盘时,除了字段中输入的文本外,屏幕变成全白.

That's pretty much sums up the question. I have an AIR Mobile Flex App project in FlashDevelop that is using views to show content. Everything works fine, I can add a TextInput or TextArea to the stage, select it (Soft Keyboard shows up then), type some text. But when I press enter or change focus to the other element to hide the keyboard, the screen turns completely white except for the text that has been entered in the field.

现在变得有趣了.如果我旋转平板电脑以强制调整屏幕,内容将再次可见.有时它甚至不显示白屏,而是在查看正在运行的应用程序列表时显示空白预览的漆黑屏幕.

Now it becomes interesting. If I rotate my tablet to force the screen to adjust, the content becomes again visible. Sometimes it doesn't even show a white screen, but rather a pitch black one that shows a blank preview when looking at the list of the running apps.

除了这种行为之外,我无法理解逻辑.似乎不知何故屏幕只是不想重绘.

I cannot grasp the logic besides this behavior. It seems that somehow screen just doesn't want to redraw.

UPD:

AIR 版本:3.1

在 HYUNDAI SmartPad H-SP701G、Android 4.0.4 上测试

Tested on HYUNDAI SmartPad H-SP701G, Android 4.0.4

UPD2:

在SANSUI ETAB 801VP上测试,仍然得到相同的效果.

Tested on SANSUI ETAB 801VP, still getting the same effect.

推荐答案

问题出在您的应用程序配置 XML 中.检查你的标签.输入auto"或cpu"的值应该可以解决问题.

The problem is in your application configuration XML. Check your tag. Entering value of "auto" or "cpu" should fix the problem.

<renderMode>auto</renderMode>

就我而言,我设置为直接,这就是问题的原因.使用直接渲染模式导致应用程序无法在 HTC Evo 3D 和三星 Galaxy s3 上运行.不过它确实适用于 HTC Desire.

In my case I set direct and this was the cause of the issue. Using direct render mode caused the application to not work on HTC Evo 3D and Samsung galaxy s3. It did work on HTC Desire though.

这篇关于当 TextInput 失去焦点时,我的 Android AIR 应用程序显示白屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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