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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:44:36+00:00 2026-05-22T02:44:36+00:00

I am working on an Android app which displays content in a WebView. The

  • 0

I am working on an Android app which displays content in a WebView. The content contains links, and those links are being handled via a custom WebViewClient and use of javascript and shouldOverrideUrlLoading() method to follow the link depending on what the link is.

Here’s the problem:

I want to handle clicks different depending on where on the WebView the click happens. In particular, I want to do some UI changes any time the user clicks on a WebView, but does NOT click on the link.

I have found that the onTouch method completes and finishes (including the super.onTouch) before the shouldOverrideUrlLoading() method is called, and I can’t find any indication of a method that runs on the WebView post-shouldOverrideUrlLoading(). I am also using a GestureDetector, and again, it’s onSingleTapUp() method completes before the shouldOverrideUrlLoading() code is fired.

There has to be some way to notice when a click happens on the WebView whether or not the shouldOverrideUrlLoading() code has run before finishing the event.

Anyone have any tips on where to look?
Anyone know an execution point that is called on the WebView after shouldOverrideUrlLoading() code has been executed?

Thanks,
Dale.

  • 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-22T02:44:37+00:00Added an answer on May 22, 2026 at 2:44 am

    I think you should be able to use the onTouch(), inside your there you can check to see if it was a link that was clicked by using:

    HitTestResult result = wv.getHitTestResult();
    url = result.getExtra();
    

    If it was a url then return false from your onTouch() so that it gets passed through to shouldOverrideUrlLoading(); If it wasn’t a url then do whatever you want to with it and return true so the system knows that you consumed the event.

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

Sidebar

Related Questions

I am working on an Android app that displays photos which are downloaded from
I made an app which is just working fine. It displays the number of
I'm working on an Android app in which I would like to use multi-touch.
I have made an android app which working fine. I implemented the Login functionality
I am working on an Android app that utilizes the Google Maps API MapView,
I am working on an Android app that uses the gdata-java-client to download documents
I'm actually working on an android app based on a background service sharing data
In my app which create an calendar using buttons..its working fine in all resolution
I've been working on the Android SDK platform, and it is a little unclear
Working with a SqlCommand in C# I've created a query that contains a IN

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.