Use this
webView.loadDataWithBaseURL("http://m.myspace.com", null,
"text/html", "utf-8", null);
On Sun, Apr 5, 2009 at 12:12 AM, Rmac <[email protected]> wrote:
>
> I have encountered a problem with focused text fields in a WebView not
> showing entered text values. As long as a WebView text field has
> focus it will not show text or even the blinking cursor. You can
> select and highlight the text or unfocus the field to see it, but when
> it gains focus it will not show the text... as if the foreground color
> of the text is white.
>
> The simplest code to demonstrate this is below. With the setTheme
> using a Light background, try typing values into the Email text field
> to notice that the text is not visible when the field is focused.
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.webkit.WebView;
>
> public class AndTest extends Activity {
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
>
> setTheme(android.R.style.Theme_Light_NoTitleBar); // <--
> causes focused text fields not to show entered text
>
> WebView webContent = new WebView(this);
> webContent.loadUrl("http://m.myspace.com");
>
> setContentView(webContent);
> }
> }
>
>
> If the setTheme is set for a Light theme, the text in focused fields
> cannot be seen. I also have this happening in my program without the
> theme if there are multiple Views within Views that have background
> colors, but the above code replicates the problem.
>
> Any suggestions or help is greatly appreciated.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---