Thursday 12 September 2013

Setting webview to occupy remaining place in the layout

Setting webview to occupy remaining place in the layout

I'm designing android layout as following image
Is there any way to set my webview to occupy remaining place in the layout.
code I have tried:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout1"
android:layout_width="750dp"
android:layout_height="800dp"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="45dp"
android:layout_marginTop="60dp"
android:orientation="horizontal" >
<!-- for image-->
<WebView
android:id="@+id/imageView1"
android:layout_width="260dp"
android:layout_height="310dp"
android:layout_marginTop="30dp" />
<!-- for text-->
<TextView
android:id="@+id/pricetext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="skjnfksjngk"
android:textColor="#5E327D"
android:textSize="30dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/webback" >
<!-- for webview>
<WebView
android:id="@+id/webview"
android:layout_width="500dp"
android:layout_height="150dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="20dp"
android:layout_weight="2.74"
android:scrollbars="vertical" />
</LinearLayout>
</LinearLayout>
Pls help any body to achieve above design.Thank You.

No comments:

Post a Comment