Adding multiple images to AnimateDrawables sample code

by Madiba » Fri, 23 Apr 2010 12:38:36 GMT


Sponsored Links
 Hello,
I was trying to add more than one images in the AnimateDrawables under
com.example.android.apis.graphics, but for some reason I couldn't. Can
anyone post a sample code on how to accomplish it or at least explain
it to me?  This beginner programmer would really appreciate it :)

Thanks

--



Other Threads

1. Emulator: 1.6 SDK release Troubleshooting Proxy

Hi All,

Trying to troubleshoot proxy, but  command as indicated in SDK
Emulator documentation results in invalid command prompt:

Documented Command:
emulator -verbose-proxy -avd

    Error indicated:

      unknown option: -verbose-proxy
      please use -help for a list of valid options

In previous SDK releases (1.5)  the following undocumented command was
functional, but now does not post any messages when accessing
Network via Browser.

emulator -debug-proxy -avd mydevice


What is the appropriate command to troubleshoot proxy?

Is this a known issue and/or bug?


Rgds,

KK
--~--~---------~--~----~------------~-------~--~----~

2. Playing a video file from resource.

Hi All,

success. I have used this code

               setContentView(R.layout.mediaplayer_2);
                mPreview = (SurfaceView) findViewById(R.id.surface);
                holder = mPreview.getHolder();

// Create a new media player and set the listeners
                mMediaPlayer = MediaPlayer.create(this, R.raw.lucky);
                mMediaPlayer.setDisplay(holder);
                mMediaPlayer.prepare();
                mMediaPlayer.setOnBufferingUpdateListener(this);
                mMediaPlayer.setOnCompletionListener(this);
                mMediaPlayer.setOnPreparedListener(this);
                mMediaPlayer.setAudioStreamType
(AudioManager.STREAM_MUSIC);

} catch (Exception e) {

        Log.e(TAG, "error: " + e.getMessage(), e);
        }

}

public void onBufferingUpdate(MediaPlayer arg0, int percent) {
Log.d(TAG, "onBufferingUpdate percent:" + percent);

}

public void onCompletion(MediaPlayer arg0) {
Log.d(TAG, "onCompletion called");

}

public void onPrepared(MediaPlayer mediaplayer) {
                Log.d(TAG, "onPrepared called");
mVideoWidth = mMediaPlayer.getVideoWidth();
mVideoHeight = mMediaPlayer.getVideoHeight();
if (mVideoWidth != 0 && mVideoHeight != 0) {
  holder.setFixedSize(mVideoWidth, mVideoHeight);
  mMediaPlayer.start();

}

while I try to run the above I can hear the audio of video file but no
video. please advise .
I m trying to play http://www.mp4mail.com/docs/files/disney_128v_16a.mp4
(mp4)
but having no luck please advise me .

Thanks
Rizwan




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

3. Global search always shows "More results... XXX (n)" for 3rd party application?

4. Global search always shows "More results... XXX (n)" for 3rd party application?

5. Why Update buffering is always 0% when mediaplayer play the rtsp ?

6. How can I extends InputMethodService and using its feature without setting system keyboard??

7. ]