问题
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