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 7531243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:07:14+00:00 2026-05-30T05:07:14+00:00

I want to set different title for alert dialog when WebView page is loaded

  • 0

I want to set different title for alert dialog when WebView page is loaded but its not working.

here is the code snippet:

final AlertDialog.Builder alert = new AlertDialog.Builder(
        mContext);
// alert.setTitle("Loading...");
final WebView wv = new WebView(mContext);

wv.loadUrl("http://10.0.51.133/androidview/");
wv.getSettings().setJavaScriptEnabled(true);
wv.setVerticalScrollBarEnabled(false);

WebViewClientLoader loader= new WebViewClientLoader(alert);
wv.setWebViewClient(loader);
wv.setWebViewClient(new WebViewClient() {

    @Override
    public void onPageFinished(WebView view, String url) {
        // TODO Auto-generated method stub
        alert.setTitle("Loading...");
        super.onPageFinished(view, url);
    }

    @Override
    public void onPageStarted(WebView view, String url,
            Bitmap favicon) {
        // TODO Auto-generated method stub
        alert.setTitle("Finished");
        super.onPageStarted(view, url, favicon);
    }
});

private class webviewclient extends WebViewClient{

}

wv.loadUrl("file:///android_asset/Like.html");
alert.setView(wv);

alert.show();
  • 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-05-30T05:07:16+00:00Added an answer on May 30, 2026 at 5:07 am

    Its perfectly work..i am posting after checking——-

    public class MyActivity extends Activity{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        WebView web=new WebView(this);
        web.setWebViewClient(new WebViewClient(){
    
            @Override
            public void onLoadResource(WebView view, String url) {
                super.onLoadResource(view, url);
            }
    
            @Override
            public void onPageFinished(WebView view, String url) {
                super.onPageFinished(view, url);
                alert.setTitle("Pages Finished");
            }
    
            @Override
            public void onPageStarted(WebView view, String url, Bitmap favicon) {
                super.onPageStarted(view, url, favicon);
                alert.setTitle("Pages Started");
            }
    
        });
        web.setWebChromeClient(new WebChromeClient(){
    
        });
        web.loadUrl("http://www.google.com");
        builder=new AlertDialog.Builder(this);
        builder.setView(web);
        builder.setTitle("Loading...");
        alert=builder.create();
        alert.show();
    }
    AlertDialog alert;
    Builder builder;
    @Override
    protected void onDestroy() {
        super.onDestroy();
    
    }
    
    @Override
    protected void onPause() {
        super.onPause();
    }
    

    }

    enter image description here

    and then it changes to

    enter image description here

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

Sidebar

Related Questions

I want set Listbox background to transparent but not working Is there any idea?
We have developers working in different geographic locations and we want to set up
I want to set a breakpoint on the __DoPostBack method, but it's a pain
I want to set some attributes just before the object is serialized, but as
I want to have a dialog containing 3 views 1. title with black background
At the present time I have my main page title set to the page
OK. The title of this qiestion is not easy to decode, but let me
I want to create 3 different themes for a dialog using a custom (own)
Not sure if the title is quite right for the question but I can't
Not quite sure how to phrase the title here. The issue is that I

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.