views:

126

answers:

1

Hi, all. I'm working on setting up a home screen layout for an Android app in which there is a 4x4 grid of launch icons. My current structure for this is like this:

<TableLayout>
  <TableRow>
    <LinearLayout android:orientation="vertical">
      <ImageButton>
      <TextView>
    </LinearLayout>
  </TableRow>
  ...
  ...
  ...
</TableView>

When I run this, I get a force-close immediately. If I remove the LinearLayout from the equation, it works, but I don't get the alignment I want. Is there something inherently wrong with putting a linearlayout inside of a tablerow? Or is there probably something else going on here? As far as I can tell, my xml is all valid and I think I have all the required attributes I need. This is kind of driving me nuts, as there does not appear to be any documentation about this setup.

A: 

I get the same thing.

D/AndroidRuntime( 1378): Shutting down VM
W/dalvikvm( 1378): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime( 1378): FATAL EXCEPTION: main
E/AndroidRuntime( 1378): java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: android.view.InflateException: Binary XML file line #19: Error inflating class LinearyLayout

Not a very descriptive trace, but I guess we simply are not allowed to make our layouts like this.

Thomas Ahle
#19: Error inflating class **LinearyLayout**
Xorlev