webView.getSettings().setSupportMultipleWindows(true);

On Wed, Mar 4, 2009 at 2:19 AM, Derek <[email protected]> wrote:

>
> Yeah, thanks ! I was using layout_weight="1.0". I've removed it and
> now the links are working. However, the login form still doesn't work
> as in Android browser.
> When I look to the source it seems very simple (No JavaScript). Some
> form fields are hidden and empty. Could it be the problem ?
>
> Here is my XML:
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    android:orientation="vertical">
>
>        <TextView android:layout_width="fill_parent"
>                android:layout_height="wrap_content"
>                android:text="@string/flickr_authwebview_title_label"
> android:layout_marginBottom="6px"/>
>
>        <LinearLayout android:orientation="horizontal"
>                android:layout_width="wrap_content"
>                android:layout_height="wrap_content"
>                android:layout_gravity="center">
>
>                <Button android:id="@+id/flickr_authwebview_button_ok"
>                        android:text="@string/flickr_authwebview_ok_button"
>                        android:layout_marginRight="10px"
>                        android:layout_marginTop="6px"
>                        android:layout_width="wrap_content"
>                        android:layout_height="wrap_content" />
>
>                <Button android:id="@+id/flickr_authwebview_button_cancel"
>
>  android:text="@string/flickr_authwebview_cancel_button"
>                        android:layout_marginLeft="10px"
>                        android:layout_marginTop="6px"
>                        android:layout_width="wrap_content"
>                        android:layout_height="wrap_content" />
>
>        </LinearLayout>
>
>    <WebView
>        android:id="@+id/flickr_authwebview"
>        android:layout_width="fill_parent"
>        android:layout_height="fill_parent"
>    />
>
> </LinearLayout>
>
> and my code:
> String url = "http://m.flickr.com/signin/";;
> WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
> webview.setWebViewClient(new AuthWebViewClient());
> webview.getSettings().setJavaScriptEnabled(true);
> webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
> webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
> webview.loadUrl(url);
> webview.setClickable(true);
> webview.requestFocus();
>
>
>    private class AuthWebViewClient extends WebViewClient
>    {
>        @Override
>        public boolean shouldOverrideUrlLoading(WebView view, String
> url)
>        {
>            view.loadUrl(url);
>            return true;
>        }
>    }
>
> Thanks for any help.
>
>
> On Mar 3, 11:40 am, for android <[email protected]> wrote:
> > Are you using weight in your webview..there are errors if the webview has
> a
> > layout_weight="1.0"
> >
> > On Mon, Mar 2, 2009 at 8:44 PM, Derek <[email protected]> wrote:
> >
> > > Anyone ?
> > > Even simple links are not followed.
> > > - Show quoted text -
> >
> > > On Mar 1, 9:08 pm, Derek <[email protected]> wrote:
> > > > To get the login form, use:
> > > > String url = "http://m.flickr.com/signin/";;
> >
> > > > On Mar 1, 9:03 pm, Derek <[email protected]> wrote:
> >
> > > > > Hi all,
> >
> > > > > I'm facing the following problem. I'm opening Flickr HTML login
> form
> > > > > with default Android browser and everything works fine when I'm
> > > > > logging (click "sign in" button in HTML form):
> > > > >  String url = "http://m.flickr.com/";;
> > > > >  Intent intent = new Intent();
> > > > >  intent.setAction(Intent.ACTION_VIEW);
> > > > >  intent.setData(Uri.parse(url));
> > > > >  startActivity(intent);
> >
> > > > > But "sign in" button does nothing when using the same in a WebView:
> > > > > String url = "http://m.flickr.com/";;
> > > > >  WebView webview = (WebView) findViewById(R.id.flickr_authwebview);
> > > > >  webview.getSettings().setJavaScriptEnabled(true);
> > > > >
>  webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
> > > > >  webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
> > > > >  webview.getSettings().setLoadsImagesAutomatically(false);
> > > > >  webview.setClickable(true);
> > > > >  webview.loadUrl(url);
> >
> > > > > What could be the problem ?
> >
> >
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to