you are probably calling from a seperate thread..after thread has done its
wrk...use the handler and change the view..

On Wed, Jan 21, 2009 at 7:49 PM, Nico <nicolas.d...@gmail.com> wrote:

>
> Hi,
> I need to replace the current View (set by the activity.setContentView
> method) by an other.
> When I call activity.setContentView two times, I get this exception :
> 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot
> $CalledFromWrongThreadException: Only the original thread that created
> a view hierarchy can touch its views.
> 01-21 14:13:54.757: WARN/System.err(1156):     at
> android.view.ViewRoot.checkThread(ViewRoot.java:1849)
> 01-21 14:13:54.757: WARN/System.err(1156):     at
> android.view.ViewRoot.requestLayout(ViewRoot.java:455)
> 01-21 14:13:54.767: WARN/System.err(1156):     at
> android.view.View.requestLayout(View.java:6575)
> 01-21 14:13:54.767: WARN/System.err(1156):     at
> android.view.View.requestLayout(View.java:6575)
> 01-21 14:13:54.777: WARN/System.err(1156):     at
> android.view.View.requestLayout(View.java:6575)
> 01-21 14:13:54.777: WARN/System.err(1156):     at
> android.view.ViewGroup.removeAllViews(ViewGroup.java:2033)
> What is problem ?
> Thx
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to