android - Linear layout below the ListView, Some portions not visible? -
i have problem linearlayout below listview. tried give listview weight , layout above, set layout_height 0dp nothing wotked.
here xml code:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:weightsum="100" android:background="#00c4ff"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="application № - " android:layout_weight="50"/> <textview android:id="@+id/number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="__" android:layout_weight="20" /> <edittext android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputtype="date" android:hint="dd/mm/yyyy" android:layout_weight="30" /> </linearlayout> <listview android:id="@+id/lvmain" android:layout_width="match_parent" android:layout_height="wrap_content"> </listview> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="bottom" android:id="@+id/ll"> <button android:id="@+id/plus" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="add"/> <edittext android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/comment" android:inputtype="text" android:hint="comment" /> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="bottom"> <button android:id="@+id/send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="send" /> <button android:id="@+id/close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="save , close"/> </linearlayout> </linearlayout> </linearlayout>
when listview fills screen, cannot see buttons below it.
<?xml version="1.0" encoding="utf-8"?> <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="100"> <linearlayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:weightsum="100" android:background="#00c4ff"> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="application № - " android:layout_weight="50"/> <textview android:id="@+id/number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="__" android:layout_weight="20" /> <edittext android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputtype="date" android:hint="dd/mm/yyyy" android:layout_weight="30" /> </linearlayout> <listview android:id="@+id/lvmain" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="90"> </listview> <linearlayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="10" android:orientation="vertical" android:gravity="bottom" android:id="@+id/ll"> <button android:id="@+id/plus" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="add"/> <edittext android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/comment" android:inputtype="text" android:hint="comment" /> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="bottom"> <button android:id="@+id/send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="send" /> <button android:id="@+id/close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="save , close"/> </linearlayout> </linearlayout> </linearlayout>
Comments
Post a Comment