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. how to reload previous activity on back button click

Dear all,

I want to reload the previous activity (history) on back button click. 
Right now When I am pressing back (Phone) it going to previous activity 
but showing from history.

So every time I click back I want to reload the history page.

regards



--

2. BubbleTextView.java from launcher package

Hi,

I want to format my text for shortcuts as done in launcher
application.  I've tried to copy "BubbleTextView.java" class directly
to my sdk project. but following parameters couldn't resolved
"mLeft","mRight","mTop","mBottom" and I could find in launcher package
where these parameters are initialized Beside this "mScrollX" also not
found.

Below link says I should be able to compile this class under sdk . but
how?
http://stackoverflow.com/questions/4649597/android-format-textview

Is any body faced such issue previously and resolved?

regards,
argon

-- 

3. Wrong widthPixels?

4. Kristen schaal

5. Confused by @Override

6. Internet for the App

7. The server could not process your apk. Try again. (again...)