Use of gifview in Android, androidgifview

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.