android:layout_height="0.5dp" will be error -
i want user imageview
<imageview android:layout_width="match_parent" android:layout_height="0.4dp" android:background="@color/bottomline" />
but android:layout_height="0.4dp" error !
the error:suspicious size: make view invisible, should used layout_weight.
and found error appear if imageview first view in linearlayout,like this
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/backgroundcolor" android:orientation="vertical" > <!-- first view error --> <imageview android:layout_width="match_parent" android:layout_height="0.4dp" android:layout_margintop="10dp" android:background="@color/bottomline" /> <!-- second view right --> <imageview android:layout_width="match_parent" android:layout_height="0.4dp" android:layout_margintop="10dp" android:background="@color/bottomline" /> <textview android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:padding="10dp" android:text="李文" android:textcolor="@color/black_text_color" android:textsize="16sp" />
how solve problem ?
you should try give height in px
if want thin line.
Comments
Post a Comment