不能在小部件中使用 Tablelayout? [英] cannot use a Tablelayout within a widget?

查看:31
本文介绍了不能在小部件中使用 Tablelayout?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的 Android 小部件的 xml 文件:http://pastebin.com/Kqxs5t9E>

这段代码在 Eclipse 中向我展示了一些不错的结果,但是一旦我将文件发送到我的设备并尝试将小部件添加到我的主屏幕,我就会收到此错误代码并且小部件显示:加载小部件时出现问题":

http://pastebin.com/UcvWs1DA

那又怎样?我无法在小部件中使用 Tablelayout ????

什么是最好的解决方案?我可以创建很多相对布局,但我想这不是一个好主意.

感谢您的帮助

解决方案

我不能在一个表格中使用表格布局小部件????

如果小部件"是指应用小部件",那么不可以,您不能在应用小部件中使用 TableLayout.可以在应用小部件中使用的小部件只有少数.

<块引用>

我可以创建很多相对布局但我想这不是一个好主意.

我不知道你为什么认为 RelativeLayout 不好.您可以使用单个 RelativeLayout 替换 LinearLayoutTableLayoutTableRow 小部件.

Here is the xml file of my Android widget: http://pastebin.com/Kqxs5t9E

This code is showing me some good results in Eclipse, but as soon as I sent the file to my device and try to add the widget to my homescreen I get this error code and the widget showing: "Problem Loading the Widget":

http://pastebin.com/UcvWs1DA

So what? I cannot use a Tablelayout within a widget????

What is the best solution so? I can create a lot of relativelayout but I guess that's not a good idea.

Thank for any help

解决方案

I cannot use a Tablelayout within a widget????

If by "widget" you mean "app widget", then, no, you cannot use a TableLayout in an app widget. There are only a few widgets that can be used in an app widget.

I can create a lot of relativelayout but I guess that's not a good idea.

I do not know why you think RelativeLayout is bad. You may be able to replace your LinearLayout, TableLayout, and TableRow widgets with a single RelativeLayout.

这篇关于不能在小部件中使用 Tablelayout?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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