I have an android application that launches the webview. When any link is clicked on the webview I don't get any visual
feedback that the link is clicked. So, user does not know if the link is clicked untill the page is loaded.
Is there any way to in which we can make webview give the highlight the moment any link is clicked on the webview? So that the user will know that the link is clicked. Kindly update.
I had the same problem .What i found the problem was with the setJavascriptEnabled(true) flag.Set this flag according to your requirement.
You need to define this feedback in your html/css file:
.button:active
{
background-color: gray;
}
Related
How do I make it so when a user clicks on my website button, it doesn't add on the the URL bar, for example, when they click on a button it will open a modal box, example.com/index.html#modalopened but I don't want that to show, I want it to only say example.com/index.html instead of the # stuff....
I tried onClick="return false;" but it made it so the button didn't work at all... :(
Any other suggestions?
Also, maybe its just easyer to disable it totally, so that when people visit the site it just says example.com instead of example.com/index.html :)
You can use angular.js to dynamically update page content without changing the URL. https://angularjs.org/
Also by using a .htaccess (depending on what webserver you're using) you can get rid of the /index.html, too and have something like http://example.com/
i am learning android dev...i am facing an issue.i have searched a lot but couldn't find the answer so posting here.
http://cnic.sims.pk/
Above website is a utility.i want to give the input to it from editText field of my app and when i press the submit button it should query the website and then i will display the result in a WebView. Right now i am displaying whole thing in a WebView that is input and result.
Can any one help me how to implement this...i just want a hint....Thanks in advance.
#Rashid Hussain i believe you need to show url when you click submit button am i right? if so add a textfield and button to layout and add onClick to submit button
I'm working on a mobile web app. The issue is apparent in some Android's (I think only 2.3.x phones).
There is a label and an input submit button on a page. Both are styled to have the same font face (TradeGothic, created by a #font-face style).
The label text always renders correctly however the button text never shows up the first time the page is visited.
So if you go to the page and either click on the button or go back and then forward (to the page in question) then the button text shows up fine.
I've tried resetting the value of the input button using jquery. I've also tried setting it's html and text however there are no changes.
What else can I try? (Besides losing the font.)
Slightly hacky option, could you not use an image for the button which is using the desired font?
I fixed the issue by loading a dummy html page in the webview (in the background) while the app is starting up.
The dummy page consists of only the html for the button and it loads the same css file.
I have a webapp for android and iphone that uses a webview to display a web page.
The page contains a graphic button implemented this way:
<INPUT id="OkBorder" type="image" src="ok_off.png" border="0" onclick="OkClicked()">
I would like users to see a click effect (image on button changes to ok_on.png then back again to ok_off.png) just before redirecting them to a new page.
I tried to use :
function OkClicked()
{
button = document.getElementById("OkBorder");
button.src = "ok_on.png";
}
but i don't see the image change when i click it...
Is there a way to show a button click effect this way in a webview ?
I don't think button.src is right because the src is not a javasript command. Is this what you wanted to do, if not then you might want to try d. Other sites seem to use hidden and visable which you might want to try.
Hello
In my android application i am using a webview to display apage of contents .
What i require is like if the user longpress on a word then that particular word should be highlighted and should be highlighted even if the user reloads the app again.
Is there any way that i can get this done in android.
Please forward your valuable suggestions.
Thanks in advance:)
Putting it in a WebView is what will make this tricky, if it were just a regular view I would say extend TextView and implement onLongClickListener for it as well. Not sure how to squeeze this into an existing webview though :/