cannot use a Tablelayout within a widget?

拜拜、爱过 提交于 2019-12-24 12:09:32

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/3383596/cannot-use-a-tablelayout-within-a-widget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!