ViewFlipper not working inside a class which extends LinearLayout

by Nithin » Thu, 22 Apr 2010 22:59:00 GMT


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

--



ViewFlipper not working inside a class which extends LinearLayout

by Streets Of Boston » Fri, 23 Apr 2010 01:25:50 GMT


 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.



>


Sponsored Links


ViewFlipper not working inside a class which extends LinearLayout

by Nithin » Fri, 23 Apr 2010 02:07:54 GMT


 Thanks for your reply.. solved the issue..

I put the flipper creation code inside the runOnUIThread() and its
working fine..

Nithin

On Apr 22, 10:25pm, Streets Of Boston <flyingdutc...@gmail.com>



> >



Other Threads

1. is ACTION_WEB_SEARCH removed from the SDK?

Just wondering what happened to the intent filter that responds to
this event. I do know how to use the VIEW action with a url syntax to
invoke a browser. Just curious as it is in the doucmentation but
results in an exception at run time

Satya

--~--~---------~--~----~------------~-------~--~----~

2. ASUS skin now available for Android Emulator!

ASUS skin now available for Android Emulator!
http://teavuihuang.com/android

To install, download and unzip "QVGA-P-ASUS.zip" to the Android skin
directory, e.g. "C:\android-sdk-windows-1.0_r1\tools\lib\images
\skins". To run the Android emulator with this ASUS skin, enter this
on the command line: "emulator -skin QVGA-P-ASUS".

--~--~---------~--~----~------------~-------~--~----~

3. why would android call oncreate when flipping the keyboard

4. MapMe Application on Android

5. Getting the Model Number field

6. Taking Camera Pictures in app

7. why would android call oncreate when flipping the keyboard