What thread is calling 'new ViewFlipper(ctContext)'?
Is it the main UI-thread?
If not, the calling thread must have a message-loop associated with it
(A looper-thread).
If it's not a looper-thread, you can't call 'new
ViewFlipper(ctContext)' this way.

On Apr 22, 10:58 am, Nithin <nithin.war...@gmail.com> wrote:
> Hi,
>
> When I tried to create a ViewFlipper inside a class which extends
> LinearLayout, its throwing an exception
>
> "java.lang.RuntimeException: Can't create handler inside thread that
> has not called Looper.prepare()".
>
> I am creating the ViewFlipper using,
>
> ViewFlipper flipper = new ViewFlipper(ctContext);
>
> But when I create the ViewFlipper in a class which extends Activity,
> its working normally. What may the reason ?
>
> Nithin
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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