webView Facebook

  • 5 Antworten
  • Letztes Antwortdatum
K

karma87

Neues Mitglied
0
Hi Leute,

ich versuche in einem WebView Dialog, meine Facebook wall anzuzeigen. Funktioniert auch aber nur bei der Darstellung, hab ich ein paar Probleme..
Die Texte werden so komisch angezeigt.

kann mir irgendjemand helfen..?

facebook.jpg

Code:
webViewDialog = new Dialog(this);
webViewDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
webViewDialog.setContentView(R.layout.webviewdialog);
webViewDialog.setCancelable(true);

webView = (WebView) webViewDialog.findViewById(R.id.wb_webview);

webView.setScrollbarFadingEnabled(false);
webView.setHorizontalScrollBarEnabled(false);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setUserAgentString("AndroidWebView");

webView.clearCache(true);
webView.loadUrl("https://m.facebook.com/");
webViewDialog.show();
 
Wie schaut dein webviewdialog layout aus?

Sent from my GT-I9100 using Android-Hilfe.de App
 
Und zwar so ...

Code:
<?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:gravity="bottom"
    android:orientation="vertical" >

    <RelativeLayout
        android:id="@+id/rl_relativeLayout"
        android:layout_width="fill_parent"
        android:layout_height="400dip"
        android:layout_gravity="center_horizontal" >

         <Button
        android:id="@+id/bt_close"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dip"
        android:layout_marginRight="10dip"
        android:background="@android:color/transparent"
        android:text="Close" />

        <WebView
            android:id="@+id/wb_webview"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" 
            android:layout_below="@id/bt_close" 
            android:layout_marginTop="5dip"/>
    </RelativeLayout>

LG
karma..
 
Hmm entferne mal das komplette RelativeLayout

Sent from my GT-I9100 using Android-Hilfe.de App
 
Habe ich schonmal gemacht..
Aber ändert leider nichts am Aussehen..
 
wird dein webview dialog in einer eigenen activity angezeigt oder Frame/ListView whatever

Sent from my GT-I9100 using Android-Hilfe.de App
 
Zurück
Oben Unten