android - How to reduce size of LinearLayout with Background Image large one -
i trying draw 2 layouts vertically top 1 containing image,since image big,it occupying portion of botton half,i used weights =1 , layoutheight=0dp partition equally,
without image,partition perfect,but if set background image toplayout ,weight ratio not perfect,which of no reuse,
i tried using framelayout,which of no use,
what exact way of doing in xml,instead of assiging layouts height programmatically.
try this:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:weightsum="1"> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.5"> </linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.5"> </linearlayout> </linearlayout>
then can set image background top layout.
Comments
Post a Comment