para un widget que utiliza un diseño simple que contiene una TableLayout¿Por qué mi TableLayout no se puede inflar?
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TableRow >
(...)
</TableRow>
</TableLayout>
Pero cuando un Deseo actualizar su contenido mediante la creación de un RemoteViews
RemoteViews eventElementLayout = new RemoteViews(this.getPackageName(), R.layout.widget_events_element);
Tengo una excepción diciéndome que TableLayout
es no permitido para ser inflado
12-04 01:36:12.548: WARN/AppWidgetHostView(195): updateAppWidget couldn't find any view, using error view
12-04 01:36:12.548: WARN/AppWidgetHostView(195): android.view.InflateException: Binary XML file line #2: Error inflating class android.widget.TableLayout
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.widget.RemoteViews.apply(RemoteViews.java:930)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.widget.RemoteViews$ViewGroupAction.apply(RemoteViews.java:513)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.widget.RemoteViews.performApply(RemoteViews.java:955)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.widget.RemoteViews.apply(RemoteViews.java:932)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:219)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.appwidget.AppWidgetHost.updateAppWidgetView(AppWidgetHost.java:250)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.appwidget.AppWidgetHost$UpdateHandler.handleMessage(AppWidgetHost.java:73)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.os.Looper.loop(Looper.java:123)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at java.lang.reflect.Method.invokeNative(Native Method)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at java.lang.reflect.Method.invoke(Method.java:521)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at dalvik.system.NativeStart.main(Native Method)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): Caused by: android.view.InflateException: Binary XML file line #2: Class not allowed to be inflated android.widget.TableLayout
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.view.LayoutInflater.failNotAllowed(LayoutInflater.java:525)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): at android.view.LayoutInflater.createView(LayoutInflater.java:472)
12-04 01:36:12.548: WARN/AppWidgetHostView(195): ... 19 more
¿Por qué?
Gracias de antemano
¡Gracias, parece que me olvidé de esta parte de la documentación! – tbruyelle