Images in GIF format are not supported on Android, but because I want to be loaded in my program just when a villain is running indicates that it is loading. And this villain runs is a GIF picture. That is, you want the program to load a GIF image as soon as it starts. Look up some methods on the internet I don't know if the version of Android I use is high (android4.4) or what the problem is that it doesn't load. Finally thought of a way to load it out. The idea is to put the GIF in the WebView to show it.
Here's the code for this:
Activity_prepare_fullscreen.xml file
<relativelayout xmlns:android= "http://schemas.android.com/apk/res/android"
xmlns:tools= "http:// Schemas.android.com/tools "
android:layout_width=" match_parent "
android:layout_height=" Match_parent "
android:background= "#F3F3F3"
>
<webview
android:id= "@+id/runwebview"
android:layout _width= "Wrap_content"
android:layout_height= "wrap_content"
android:layout_centerhorizontal= "true"
android:layout_centervertical= "true"/>
<textview
android:id= "@+id/fullscreen_content"
android:layout_width= "wrap_content"
android:layout_height= "wrap_content"
android:layout_below= "@+id/runwebview"
android:layout_centerhorizontal= "true"
android:gravity= "center"
android: Keepscreenon= "true"
android:text= is loading please wait ... "
android:textcolor=" #33b5e5 "
android:textsize=" 30SP "
android:textstyle=" bold/>
</RelativeLayout>
Preparefullscreenactivity.java file
The extra is not posted, this is the main two sentences
Private WebView Runwebview=null;
Runwebview = (webview) Findviewbyid (R.id.runwebview);
The next sentence is to put the file, the file in the assents decentralized
Runwebview.loaddatawithbaseurl (null, "
Hope that through this article, can help you solve this problem, thank you for your support of this site!