Need to create Android toggle button in Iphone style

by Balraj Singh » Fri, 20 May 2011 09:34:08 GMT

Sponsored Links

I have a requirement to create a toggle button in Android but in
Iphone style something as shown in link below:- 

Can anyone tell me how to implement this or if provide the code for


Other Threads

1. Starting out with animations, need some help

Hi all, I'm starting to add animation to my game, but I'm having some
I'm attaching an excerpt of the code:
                                //get coordinates
                                int[] handLocation = {0,0};
                                int[] deckLocation = {0,0};

                                //move from deck location to hand location
                                TranslateAnimation dealCardAnimation = new 
I have a deck and 4 hands and I'm dealing cards to them.
I've added this to the deal cards loop
I'm guessing I have more than one mistake here since nothing is
happening on the screen in the entire loop.
I saw some other people have called a post() method on the underlying
layout but I didn't see where it says to do so.
can someone please help me with this?

2. getRuntime().exec("su do seomthing") fails (exit code)

As of 1.5 applications can no longer use su.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


3. A window does not automatiacally resize when an IME is shown

4. another AppWidget issue: can't start parent app, "process is bad"

5. File I/O and efficiency

6. Mimetypes and their associated icons

7. How to enforce the soft keyboard