hello,
I have some problems removing views.
Inside my xml I have a LinearLayout with a ScrollView with a
TableLayout.
Into this I am adding (using Java) childs, which are LinearLayouts (no
TableRows).
This works fine.
Now I want to remove some childs, which are LinearLayouts.
linearlayout.setVisibility(View.GONE) works finde but doesnt remove
the Object itself.
tablelayout.removeView(linearlayout) works only under strange
circumstances: removing the last element of my list works fine.
removing some element in the middle throws this exception:
Uncaught handler: thread main exiting due to
uncaught exception
java.lang.NullPointerException
at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1207)
at
android.view.ViewGroup.drawChild(ViewGroup.java:1434)
at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1208)
at android.view.View.draw(View.java:5571)
at
android.widget.FrameLayout.draw(FrameLayout.java:324)
at
android.view.ViewGroup.drawChild(ViewGroup.java:1436)
at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1208)
at
android.view.ViewGroup.drawChild(ViewGroup.java:1434)
at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1208)
at
android.view.ViewGroup.drawChild(ViewGroup.java:1434)
at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1208)
at
android.view.ViewGroup.drawChild(ViewGroup.java:1434)
at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1208)
at android.view.View.draw(View.java:5465)
at
android.widget.FrameLayout.draw(FrameLayout.java:324)
linearlayout.removeAllViews() I tried in order to clear all childs of
my linearlayout (which are some buttons and textviews in fact), but
this doesnt change anything.
Any idea what I am doing wrong?
Greetings,
DaRolla
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---