• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

play gif in media player

faisalloe

Newbie
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:orientation="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>
 
Back
Top Bottom