Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8208767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:29:19+00:00 2026-06-07T09:29:19+00:00

I create webview in code. In this webview I show pictures. Now I have

  • 0

I create webview in code. In this webview I show pictures. Now I have two questions. How I can show image in full size, because my pictures has resolution 1381×1829 and I see only part of this picture. And second. As you can see in code I load pictures from assets, but I want to load pictures from sd card. How I can do that?

This is code:

    WebView web = new WebView(getContext());
web.getSettings().setJavaScriptEnabled(true);
web.getSettings().setBuiltInZoomControls(true);
web.loadUrl("file:///android_asset/lj.png");


addView(web);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:29:21+00:00Added an answer on June 7, 2026 at 9:29 am

    This method webview.getSettings().setBuiltInZoomControls(true) will let you implement build in zoom control for non-multitletouch screen

    You can load image from anywhere from sdcard to webview using this code.
    That is if u want to load multiple image from multiple location.

    String base = Environment.getExternalStorageDirectory().getAbsolutePath().toString() + "/Your/Folder";
    String imagePath = "file:/"+ base + "/test.jpg";
    String html = "<html><head></head><body><img src=\""+ imagePath + "\"></body></html>";
    mWebView.loadData(html, "text/html","utf-8");
    

    But if u want to load images exist under the same parent folder, this will do the trick

    String imagePath = "test.jpg";
    String html = "<html><head></head><body><img src=\""+ imagePath + "\"></body></html>";
    mWebView.loadDataWithBaseURL("file:///mnt/sdcard/Your/Folder/", html, "text/html","utf-8",null);
    

    BE WARN, if u try to load hi-res image like 1600×1840 to webview, webview WILL reduced image res to maintain memory usage, which result in BAD looking image

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a WebView programmatically. This works perfect. The code is below. What
I am trying to create a WebView dynamically using the following code: mWebView =
I used webView to show javaScript,one image was included in the javaScrip,but the webView
I've got WebView, JS code inside it. Also I have interface to allow Java
I have view that has a webview and a UIToolbar. I want to create
I have been checking around the PayPal API and got this, a webView displaying
I have this code which when runs on emulator prints the log message which
I need create WebView which can load a page from Youtube. I don't want
In my code i want to show webview and textview in a list from
I am trying to create a webview in adroid with private browsing enabled. public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.