Android Open Source - gif-movie-view Main Activity






From Project

Back to project page gif-movie-view.

License

The source code is released under:

Copyright (c) 2013, Sergey Bakhtiarov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are me...

If you think the Android project gif-movie-view listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.basv.gifmoviewview;
/* ww w  .j a va  2s.c om*/
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.basv.gifmoviewview.widget.GifMovieView;

public class MainActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    
    final GifMovieView gif1 = (GifMovieView) findViewById(R.id.gif1);
    gif1.setMovieResource(R.drawable.gif_heart);
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
  }

  public void onGifClick(View v) {
    GifMovieView gif = (GifMovieView) v;
    gif.setPaused(!gif.isPaused());
  }

}




Java Source Code List

com.basv.gifmoviewview.MainActivity.java
com.basv.gifmoviewview.widget.GifMovieView.java