Hello,

I have a problem with webview. the filled area of the webview is depending
on the content of the webview. i've selected it as fill_parent for height
but if the content on the webview is small the webview doesnt fills my
layout and there will be a black gap. how can i solve it?

Layout xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
    android:id="@+id/LinearLayoutInfos"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:id="@+id/LinearLayoutTop"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5px"
        android:orientation="vertical" >

        <LinearLayout
            style="@style/Title"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal" >

            <ImageView
                android:id="@+id/IconApp"
                android:layout_width="48px"
                android:layout_height="48px"
                android:layout_gravity="center" />

            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/nameApp"
                    style="@style/Title" />

                <TextView
                    android:id="@+id/authorApp"
                    style="@style/Title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="13sp" />

                <LinearLayout
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:paddingLeft="10px" >

                    <RatingBar
                        android:id="@+id/ratingbar"
                        style="?android:attr/ratingBarStyleSmall"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:isIndicator="true"
                        android:numStars="5"
                        android:visibility="invisible" />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

        <ScrollView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:background="#000000" >

            <WebView
                android:id="@+id/descriptionApp"
                android:layout_width="fill_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="10px"
                android:text="description" />

        </ScrollView>

        <LinearLayout
            android:id="@+id/LinearLayoutBottom"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5px"
            android:layout_weight="0"
            android:orientation="horizontal" >

            <Button
                android:id="@+id/ButtonOpen"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="@string/open" />

            <Button
                android:id="@+id/ButtonDownload"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="Go" />

            <Button
                android:id="@+id/ButtonBuy"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="Go 2"
                android:visibility="gone" />

            <Button
                android:id="@+id/ButtonUninstall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="@string/uninstall" />
        </LinearLayout>

</LinearLayout>

Screenshot: *
http://desmond.imageshack.us/Himg861/scaled.php?server=861&filename=screenshot20120209at103.png&res=medium
*

Thanks

-- 
M.Musa Ülker

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to