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

  • SEARCH
  • Home
  • 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 8155205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:36:12+00:00 2026-06-06T16:36:12+00:00

I needed to build an Android app that lets you view a web page

  • 0

I needed to build an Android app that lets you view a web page inside my app. I needed this not to be in a browser but my app.
I found the answer and some options for when page is loaded.
I thought I’d try sharing the info I found here, after I tested of course…..

  • 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-06T16:36:13+00:00Added an answer on June 6, 2026 at 4:36 pm

    First need to add INTERNET permission to your manifest.

     <uses-permission android:name="android.permission.INTERNET" />
    

    Then, use the WebView class to display a web page. First, create a layout that contains a webview:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  android:layout_width="fill_parent" 
                  android:layout_height="fill_parent"
                  android:orientation="vertical">
    <WebView android:id="@+id/myWebView"
                  android:layout_width="fill_parent" 
                  android:layout_height="fill_parent" />
    </LinearLayout>
    

    In your Activity, (probably the onCreate), initialize a WebView object by using the layout you created. An example is below.
    private WebView webview;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.somelayout);
    
        String url = "http://bigdaddyapp.com";
    
        webview = (WebView) findViewById(R.id.myWebView);
        //next line explained below
        webview.setWebViewClient(new MyWebViewClient(this));
        webview.getSettings().setJavaScriptEnabled(true);
        webview.loadUrl(url);
    }
    

    If you’d like specific options, like catching pages as they load, you need an inner WebViewClient class. For example, you can use the onPageStarted(…) method to do something whenever a new page is loaded in your webview:

     public class MyWebViewClient extends WebViewClient {
    
      public MyWebViewClient() {
         super();
         //start anything you need to
      }
    
      public void onPageStarted(WebView view, String url, Bitmap favicon) {
         //Do something to the urls, views, etc.
      }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I needed to build an android SDK that other developers can integrate into
I try to use wilcards in Android.mk with help of this answer https://stackoverflow.com/a/8459242/1039175 But
If I build and distribute an Android app with a mysql database, it's pretty
I needed to install Ubuntu Lucid 10.04 for my dev work. I found that
I want to add a new calendar to Android that does not get synchronized.
Needed Finfo but deleted msi package, so uninstalled php 5.3.0, downloaded 5.3.2 and installed.
I needed a function that simply checks if a string can be converted to
I have the localized strings file that is used in the Iphone app that
I have a module that builds an app called MyApp. I have another that
I am new to Eclipse and Android programming in general but I have been

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.