UPDATE: It has something to do with several .addView() commands from
the same view, ie:
mLinearLayout.addView(nTableLayout,
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
mLinearLayout.addView(oTableLayout,
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
mLinearLayout.addView(pTableLayout,
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
This is where my problem is. I don't know what changes I have to make
to make it add all three TableLayouts to the single LinearLayout. If
anyone knows how to fix this, please let me know. So far everything I
know about android is from looking at example code and figuring out
what I have to modify to make it work for my needs, but I kind of hit
a wall on this one.
On Sep 27, 1:17 am, Jeffrey <[email protected]> wrote:
> So, here is what I need to make, three TableLayouts that have a Text
> View above them, this is what I'm doing:
>
> ScrollView mScrollView;
> TableLayout mTableLayout;
> TextView mTextView;
> LinearLayout mLinearLayout;
> TableLayout nTableLayout;
> TableLayout oTableLayout;
> TableLayout pTableLayout;
>
> ...
> ..
> .
>
> mScrollView = new ScrollView(this);
> mTableLayout = new TableLayout(this);
> mTextView = new TextView(this);
> mLinearLayout = new LinearLayout(this);
> nTableLayout = new TableLayout(this);
> oTableLayout = new TableLayout(this);
> pTableLayout = new TableLayout(this);
> mScrollView.addView(mTableLayout);
> mTableLayout.addView(mTextView);
> mTableLayout.addView(mLinearLayout);
> mLinearLayout.addView(nTableLayout);
> mLinearLayout.addView(oTableLayout);
> mLinearLayout.addView(pTableLayout);
>
> This should work but for some reason it keeps force closing on me. It
> works just fine when I dump images into an interface containing only
> one TableLayout within a ScrollView.
>
> Does anyone know a solution to this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---