1

I have a WebView here so that users of my app can see my web site and I wanted the app version to appear above the Webview so I embedded the WebView tag inside of the LinearLayout but when I ran the project on my device it only scrolls sideways, (not even completely there), and no up and down. How do I fix this? The TextView has a string value called "ver_num" and in the app it says 1.0

<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/ver_num" />
     <WebView
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/webview"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent" />
 </LinearLayout>
user1956475
  • 45
  • 1
  • 6

1 Answers1

1

Your XML does not even compile, use this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/ver_num" />

    <WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>
jenzz
  • 7,239
  • 6
  • 49
  • 69
  • It still does the same exact thing :( – user1956475 Jan 27 '13 at 15:05
  • Which website are you trying to load? Maybe it is a website issue (HTML/CSS/JS)? – jenzz Jan 27 '13 at 15:09
  • The website loads fine for me (Galaxy Nexus, JB 4.2). It makes heavy use of JavaScript though. Try setting `WebView.getSettings().setJavaScriptEnabled(true);` to your WebView. – jenzz Jan 27 '13 at 15:27