Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 972797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:10:46+00:00 2026-05-16T03:10:46+00:00

Here is the xml file of my Android widget: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

  • 0

Here is the xml file of my Android widget:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">

    <TableLayout 
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="fill_parent"
            android:stretchColumns="1">
        <TableRow>
            <!-- Some views -->
        </TableRow>
    
        <TableRow>
            <!-- Some views -->
        </TableRow>
    </TableLayout>

</LinearLayout>

(full code here: 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":

08-01 22:11:26.917: WARN/AppWidgetHostView(5860): updateAppWidget couldn't find any view, using error view
08-01 22:11:26.917: WARN/AppWidgetHostView(5860): android.view.InflateException: Binary XML file line #20: Error inflating class android.widget.TableLayout
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.view.LayoutInflater.createView(LayoutInflater.java:513)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.widget.RemoteViews.apply(RemoteViews.java:930)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:219)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:155)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.appwidget.AppWidgetHost.createView(AppWidgetHost.java:218)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at com.fede.launcher.Launcher.bindAppWidgets(Launcher.java:3652)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at com.fede.launcher.Launcher.access$22(Launcher.java:3639)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at com.fede.launcher.Launcher$DesktopBinder.handleMessage(Launcher.java:4625)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.os.Looper.loop(Looper.java:123)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at java.lang.reflect.Method.invokeNative(Native Method)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at java.lang.reflect.Method.invoke(Method.java:521)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at dalvik.system.NativeStart.main(Native Method)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860): Caused by: android.view.InflateException: Binary XML file line #20: Class not allowed to be inflated android.widget.TableLayout
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.view.LayoutInflater.failNotAllowed(LayoutInflater.java:525)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     at android.view.LayoutInflater.createView(LayoutInflater.java:472)
08-01 22:11:26.917: WARN/AppWidgetHostView(5860):     ... 20 more

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:10:47+00:00Added an answer on May 16, 2026 at 3:10 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded kankan's wheel widget as an *.apk from here http://code.google.com/p/android-wheel/downloads/list and then
here is the XML file : <com.google.android.maps.MapView android:layout_width=fill_parent android:layout_height=fill_parent android:apiKey=0q7NUYm4bgzeXlqXtKYVPJDRWUJmt8Cu0gvbWMx android:id=@+id/map_view /> and Manifest
I have <.ImageView> enter code here s(icons) in my android layout xml file, which
So I'm having pretty much exactly the problem described here: http://code.google.com/p/android/issues/detail?id=6191 and until the
how to retrieve both instances of element in an xml file here is how
Here is a short XML file with 2 nodes having the same children (but
Here is part 1 of our problem (Loading a dynamically generated XML file as
I have an XML file that I'm trying to read from here , and
Here is my first attempt at validating XML with XSD. The XML file to
I have an XML file that is very long, but here is a shot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.