webview

Formatting webView content

I am getting some HTML text from a remote server which I am displaying inside a WebView. I need to format the text display and set a font size and color for the WebView. The only way I can think of is: pre-pending the HTML string received with a tag and specify the font information there. What is the correct way to do this? ...

Figuring if a link is clicked on a webView - iPhone

Hi, I am using a custom webview to show a tabbar when user touches on the webview. But when I clicked on a link in a webview, tabbar is shown for a little time and then page loads. I am using this custom webview to detect touch: http://github.com/psychs/iphone-samples/blob/b772b963f2acf18d478b41b44555992fcd8d4f31/WebViewTappingHack/Clas...

Find and Replace in WebView?

Does WebView support Find and Replace? The docs suggest that it does i.e. performFindPanelAction: appears to be implemented, but the Find panel will not enable it's buttons. Any ideas? MT ...

How do I use the session in WebView in my other stuff (Android)?

The user must login through the WebView. Of course, the session is for that WebView. But, what if I need to make REST API calls during my Android application? Those REST API calls need the session to be authenticated , otherwise those will not work. Is there any way I can attach the cookies of WebView into everything I do in Android? ...

Android: Get the scroll position of a WebView

I'm new to Android. I would like to simply know where on a page the user has scrolled. When a certain point on the web page appears at the bottom of the screen, I want to trigger an event. But this code causes an exception. I know that WebView inherits getScrollY() from View. Am I not implementing it correctly? Thanks in advance. publ...

Android: Image displayed at Webview from Url with high quality loss

I want to display an image from an url with an Webview at Android. With Android phones with Version 1.5 and 1.6 there is no problem. but the same pic and the same code on an AndroidPhone with Version 2.0 and the pic is totaly pixelated. Like Android is resizing the image first to a smaller one and then resizing it back to "normal" size...

Android Webview - Completely Clear the Cache

Heya Everyone, I have a WebView in one of my Activities, and when it loads a webpage, the page gathers some background data from Facebook. What I'm seeing though, is the page displayed in the application is the same on each time the app is opened and refreshed. I've tried setting the WebView not to use cache and clear the cache and hi...

WebView load css from local file

[[self mainFrame] loadHTMLString:@"<html><body><link href='main.css' rel='stylesheet' type='text/css' /></body></html>" baseURL:nil]; I am trying to load a css file called main.css from the application Resources folder as below from a WebView, how do i get the path of the resources folder correct so i can load the css? ...

WebView load css on the fly

I have the following code which loads and html file into a webview - (void)awakeFromNib{ NSString *resourcesPath = [[NSBundle mainBundle] resourcePath]; NSString *htmlPath = [resourcesPath stringByAppendingString:@"/main.html"]; [[self mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]]; ...

Android: how to tell if a view is scrolling

in iPhone, this would be simple---each view has a scrollViewDidScroll method. I am trying to find the equivalent in Android. My code works, but it isn't giving me what I want. I need to execute code the entire duration that a view is scrolling. So, even though I use OnGestureListener's onScroll method, it only fires when the finger is o...

In an android app I would like to show a progress bar on a child tab until the webview loads. Any ideas?

Hi In an android app I am using a tabview for an app and one of the tabs shows a webview. But the page is blank until the web page loads. how would one show a progress bar until the page loads. It cannot be in the title bar because that is hidden by the tabhost ...

Android Web View

I am curious if there is a way from within a WebView when a button is clicked it display a new view on top of the current display. I have a web site and when the user clicks the signature field I want to be able to capture the signature on the device. From the best I can tell the easiest way is to write this section in the Android SDK....

Webview can't type in, is that because of missing setting?

I have an Android application that connects to Facebook to request authorization of an Application. I use the following setting in the WebView, but once the view is loaded, I can't type in login details. What I am missing? WebView webview; webview = (WebView) findViewById(R.id.facebookview); webview.getSettings().setJavaScriptEnabled(t...

LinearLayout of a WebView and a Button.

Hi, I recently struggled with an apparently simple Android layout: I wanted a WebView above a Button. It worked fine with the following parameters: WebView: Height: wrap-content Weight: unset (by the way, what is the default?) Button: Height: wrap-content Weight: unset However if the web page became too big it spilled out ove...

HTML inside webView

I am posting some data to a server using DefaultHttpClient class and in the response stream I am getting a HTML file. I save the stream as a string and pass it onto another activity which contains a WebView to render this HTML on the screen: response = httpClient.execute(get); InputStream is = response.getEntity().getContent(); Buffered...

Disable scrolling in webview?

Hi there, Until now I have been an iPhone developer only and now I have decided to give Android a whirl. Something I haven't been able to figure out on Android is how to programmatically prevent scrolling in a webview?? Something similar to iPhones prevention of the onTouchMove event would be great! Thanks in advance! ...

Android Webview + WebViewClient + javascript + hardware input

I've a webview which should distinguish between internal site links and external links. I achieve this behavior by adding a html anchor named "#external" to every link url which contains html-attribute target="_blank" with the help of javascript and checking the urls with WebViewClient's shouldOverrideUrlLoading This solution work...

Android WebView progress bar

I have looked at a question similar to this here but as I am a newbie could someone explain how to get this to work in a WebView or at least how to set a 10 second time delay so people know that it's loading? ...

how to show the web view as OverviewMode(completely zoomed out) in android? how??

i want to load my web view as a overview mode(completely zoomed out). that is the webpage zoomed out completely at the initial state. i coded like this: webview_obj.getSettings().setLoadWithOverviewMode(true); its not working. what is the mistake and how to rectify it? ...

Is there a better way to refresh WebView?

Hi all. Ok. I have looked EVERYWHERE and my little brain just can't understand a better way to refresh an activity. Any suggestions that I can understand would be great. :) Here is the java code: package com.dge.dges; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; im...