1. Download our Official Android App: Forums for Android!

play gif in media player

Discussion in 'Music & Media' started by faisalloe, Feb 8, 2010.

  1. faisalloe

    faisalloe Newbie
    Thread Starter
    15

    Jan 21, 2010
    17
    0
    15
    I am having the following code, any good example playing gif image in media player loading from resources?

    public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.videoview);
    MediaPlayer mMediaPlayer = MediaPlayer.create(this, R.drawable.animation15);
    mMediaPlayer.start();
    }

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:eek:rientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <SurfaceView android:id="@+id/surface"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center">
    </SurfaceView>
    </LinearLayout>
     

    Advertisement

Share This Page

Loading...