play gif in media player


Last Updated:

  1. faisalloe

    faisalloe Member This Topic's Starter

    Joined:
    Jan 21, 2010
    Messages:
    17
    Likes Received:
    0
    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...