Use of gifview in Android, androidgifview
1. Import GifView. jar
2. xml
<Com. ant. liao. GifView
Android: id = "@ + id/gif1"
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
Android: layout_centerInParent = "true"
Android: enabled = "false"
/>
3. java
Public class MainActivity extends Activity {
Private GifView gif;
@ Override
Protected void onCreate (Bundle savedInstanceState ){
Super. onCreate (savedInstanceState );
SetContentView (R. layout. activity_main );
Gif = (GifView) findViewById(R.id.gif 1 );
Gif.setGifImage(R.drawable.gif 1 );
}
}
Android studio prompts NULL pointer with GifViewjar
You don't have setContentView. How do you get findViewById ......
An android image-watching software mainly supports GIF animation, that is, QQ emoticons can't see GIF images.
What is the image Viewer on the android forum? It is a good software for reading pictures.