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. MediaPlayer and Amr

I used MediaPlayer for play an amr file and it work good. Now I'd like
to play an amr stream progressive. I must use a my socket connection
to get audio stream (no rtp no http but a private protocol). Can I
play a buffer amr using ParcelFileDescriptor.fromSocket(_sc); ?

I read the doc about ParcelFileDescriptor but is not clear how must be
used. I written that little code but it does't work

if (_pfd==null){
   _pfd = ParcelFileDescriptor.fromSocket(_sc);
   player = new MediaPlayer();
    Parcel data = null;
   data = Parcel.obtain();
 _pfd.writeToParcel(data, 0);
   Parcel data = null;
   data = Parcel.obtain();
  _pfd.writeToParcel(data, 0);
    if (_iNAudioFrames==300){  // play the stream after 300 frames

somebody can help ? Is possible do it ?


2. Project Idea....Not sure if its possible!

Hi guys thiss is my first time posting and I really have no clue of
the capabilties of Android etc so pease bear with me.

Ok basically what I would like to do is create an app using gps, which
tracks the direction and speed the user is moving.

 now the next part is the part im not sure if it is possible.

 I need the app to either track other users movements or recieve info
from other users about their movements(directions and speed).
The other users would be using the same app but on seperate devices.
The users would be within no more than 30 meters apart.

Does anybody know if this would be possible, and how difficult it
would be if possible?

I'm trying to avoid using wifi but if this is not possible I may have
to change my idea a bit and look into it...


3. Uniquely identifying a phone via an Http request

4. Screen Orientation Change

5. SDK 1.6 and emulator sdcard problem

6. Mobile phone accelaration sensor

7. 绛斿: Low-level network data?