android - Listview is not visible with other elements on top of it -
i'm trying create ui attached image. xmal code below. there 1 main issue i"m running into. understand can't embed listview
within scrollview
. problem is, because of stuff on top of listview, small portion of listview shown no matter kind of height give parent linearlayout.
how can layout ui listview visible , can scrolled other ui elements on top of it? suggestion apperciated. in advance
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:minwidth="25px" android:minheight="25px" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bkicon" android:id="@+id/linearlayout1"> <linearlayout android:orientation="horizontal" android:minwidth="25dp" android:minheight="25dp" android:layout_width="match_parent" android:layout_height="100dp" android:background="@drawable/bkicon" android:weightsum="4" android:id="@+id/linearlayoutbuttons"> <button android:text="posts" android:layout_width="50dp" android:layout_height="100dp" android:background="@drawable/mybuttonselected" android:layout_weight="1" android:id="@+id/btngohomemb" /> <button android:text="chat" android:layout_width="50dp" android:layout_height="100dp" android:background="@drawable/mybutton" android:layout_weight="1" android:id="@+id/btngohomemb" /> <button android:text="business" android:layout_width="50dp" android:layout_height="100dp" android:background="@drawable/mybutton" android:layout_weight="1" android:id="@+id/btnmbrefresh" /> <button android:text="resources" android:layout_width="50dp" android:layout_height="100dp" android:background="@drawable/mybutton" android:layout_weight="1" android:id="@+id/btnmbnewmessage" /> </linearlayout> <button android:text="" android:gravity="left|center_vertical" android:textappearance="?android:attr/textappearancemedium" android:layout_height="wrap_content" android:layout_width="fill_parent" android:textcolor="#000000" android:textstyle="bold" android:background="@drawable/mybutton" android:id="@+id/locheader" /> <textview android:text="" android:textappearance="?android:attr/textappearancemedium" android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="left|center_vertical" android:textcolor="#000000" android:id="@+id/locbody" android:background="#ffffff" /> <textview android:text="\nwhat's on mind?\n" android:textappearance="?android:attr/textappearancemedium" android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="left|center_vertical" android:textcolor="#ffffff" android:id="@+id/lblwhatonyourmind" android:background="#000000" /> <imageview android:src="@android:drawable/ic_menu_gallery" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/imageview1" /> <edittext android:inputtype="textmultiline" android:lines="8" android:minlines="6" android:gravity="top|left" android:maxlines="10" android:layout_height="wrap_content" android:layout_width="fill_parent" android:scrollbars="vertical" android:id="@+id/etnewpost" /> <linearlayout android:orientation="horizontal" android:minwidth="25px" android:minheight="25px" android:layout_width="match_parent" android:layout_height="50dp" android:background="@drawable/bkicon" android:weightsum="3" android:id="@+id/linearlayoutbuttons"> <button android:text="add pic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/mybutton" android:layout_weight="1" android:id="@+id/btnpostpicture" /> <checkbox android:text="" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/chbxrestrict" /> <button android:text="post" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/mybutton" android:layout_weight="1" android:id="@+id/btnpost" /> </linearlayout> <listview android:minwidth="25px" android:minheight="25px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:id="@+id/lvpostedmsges" /> </linearlayout>
this happening because heights of elements above listview taking minimum space need , leaving small portion free list view, since linear layout stacks elements on after other giving priority previous elements. think redesigning page in better way.
Comments
Post a Comment