Here i put black_gif. Try this, bellow code display gif file in progressbar Suggestion: is better load gif with static images for more information check WebView.loadDataWithBaseURL(base + '/', yourData, "text/html", "utf-8", null) String base = Environment.getExternalStorageDirectory().getAbsolutePath().toString() Or if you want to load image from SD card or where else, here is the idea. Our hand-printed designs are available on women, men, and plus-size t-shirts, tank. Whether you're a nerd, science geek, feminist, gamer, punster, fitness nut, or just want to show off your quirky self with our RBG, introvert, or LGBTQ classics. WebView.loadDataWithBaseURL("file:///android_asset/", yourData, "text/html", "utf-8", null) At LookHUMAN, we feature over 100,000 unique and fun designs so you can express your unique identity. BaseUrl could be the base url such as the path to asset folder, or SDCard or any other path, where your images or the other media resides related to your html Notice: should use loadDataWithBaseURL. To create your own animated GIF meme template, choose a video in the GIF Maker and click 'Save as Template'. WebView.getSettings().setAllowFileAccess(true) Animated GIF Templates The most popular blank GIF templates uploaded by Imgflip users. Important to add this attribute to webView to get resource from outside. If you want load dynamically you have to load the webview with data: // or "/name.gif" (e.g: file:///android_asset/name.gif for resources in asset folder), and in loadDataWithBaseURL(), you don't need to set base URL, on the other hand, it's similar to loadData() method. Web.loadUrl("file:///android_asset/htmls/name.html") Web.setBackgroundColor(Color.TRANSPARENT) //for gif without background In your Activity put the next code inside of onCreate web = (WebView) findViewById(R.id.webView) This app is made to be simple and easy to operate. Also put (main/assets/htmls/name.gif) ĭeclare in your Xml for example like this (main/res/layout/name.xml): You can choose any GIF image file to set as your phone Live Wallpaper.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |