android - How to set ListView Height to auto? -


i want set listview height auto means per items add listview @ time height increase auto automatically.

<scrollview     android:id="@+id/abcd_scroll"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:layout_centerhorizontal="true" >      <linearlayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical">          <relativelayout             android:id="@+id/profile_layout"             android:layout_width="match_parent"             android:layout_height="220dp"             android:layout_alignparenttop="true"             android:layout_centerhorizontal="true"             android:background="@drawable/blur_default_img">              <relativelayout                  android:id="@+id/profile_img_rt"                 android:layout_width="100dp"                 android:layout_height="100dp"                 android:layout_margintop="20dp"                 android:layout_marginleft="20dp"                 android:gravity="center"                 android:background="@drawable/circle_white_bg">          <com.example.roundedimageview.roundedimageview             android:id="@+id/profile_img"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_centerhorizontal="true"             android:layout_centervertical="true"             android:src="@drawable/person_avatar" />           </relativelayout>        </relativelayout>         <listview             android:id="@+id/tab_pending_list"            android:layout_width="fill_parent"            android:layout_weight="1"            android:layout_height="0dp"            android:layout_below="@+id/profile_layout">         </listview>    </linearlayout> </scrollview> 

so xml please kindly go through , suggest me solution how increase height of listview automatically.

the listview scrollable view should never put inside scrollable view scrollview.

the listview display row describe adapter behind it. need delete scrollview , keep listview android:height=wrap_content


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -