Show the location or address bar in Android WebView? - android

There are posts all over the internet about how to hide the address bar in a WebView, but by default the WebView activity does hide the address bar. I'm interested in actually showing the address bar on a WebView inside my own Activity. However, I don't want to pop out to the default browser, because I am using my own WebViewClient which utilizes onPageStarted to detect when a success URL is reached and finish() back to the parent activity.
I want the address bar to show the user that they are actually at the URL they think they are so that they don't accuse me of phishing. Is there a way to have a WebView show its address bar with its current URL?

WebView "does not include any features of a fully developed web browser, such as navigation controls or an address bar" as per the developer docs.
You could implement a toast or alike to show where the user is being tacking...?

Related

What css property will cause the URL bar on Chrome android browser to auto hide?

If you go to twitter.com on the Android Chrome browser and scroll up, then the address bar will auto hide itself to make more room for the webpage.
My app used to do this. But now I am not sure what I tweaked to make this no work.
The main div of the app is set to height: 100vh. And because the address bar does not auto hide, the bottom is clipped.

Fullscreen Activity with titlebar backbutton

I am making a webview client app for my RSS website. The webview and splashscreen are working great in theme.notitlebar.fullscreen.
Because external links are opening in my webview, i want a back button in the titlebar. But i want to keep the full screen option, to remove the time and notifications, and the device buttons.
What i dont understand: Is it correct that the titlebar includes: the bar with time and notifications - bar with app name, back button and settings (extra) button - the device buttons (if available)?
If that is right. How can i add a new bar into the mainactivity with my webview client, with a back button in it.
I hope you understand my question.
You can use image view. set src to back icon. and finish(); activity on imageview click.

Android: Handle click link event in edittext

I have an EditText where I wanted to make link (email, web, phone) clickable. I was able to do it by using
mBodyText.setMovementMethod(LinkMovementMethod.getInstance());
it works perfectly and all links open when clicking on them.
Here comes my requirement. I want to open contextual action bar (like default copy/ paste one) when user click on a link in edit text.
I know how to start a contextual action bar. But I don't know how can I catch the event when user clicks the link and to identify what kind of link it is (phone or web etc...) to show the proper menus in CAB.
After searching for hours, I come here to get the suggestion.

How to get Action from Webview android

How to handle View in Webview(Android). example - i am loading some web page which has some Text Field and buttons. From application level how to find whether text filed is clicked or button is clicked.
Set WebViewClient on your webView .Read here

webview searchbar appear after a link to the same page

My application has a webview without any searchtool, like a fullscreen mode.
When i clik on a link, the search bar with the address of the site appear.
How can i hide it ? I would like to continue in fullscreen mode.
I finaly found something interesting here :
http://developer.android.com/guide/webapps/webview.html
in the section "handling page navigation"
I'll make some tests.

Categories

Resources