Since i am new in android programming i am facing one issue as described below :
I have a ListView
inside a ScrollView
, but it is not expanding (e.g : if i have 3 data, the ListView is only showing 1 data) i need to make the ListView
expanding.
Here is my xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/svprofile"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<LinearLayout
android:id="@+id/linLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="vertical">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/imageToUpload"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/ic_menu_camera"
android:layout_marginTop="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Profile Detail"
android:id="@+id/tvProfileDetail"
android:layout_marginTop="30dp" />
<EditText
android:id="@+id/etFullname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/Fullname"
android:editable="false"/>
<EditText
android:id="@+id/etEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:hint="@string/Email"/>
<EditText
android:id="@+id/etPhone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:hint="@string/Phone"/>
<EditText
android:id="@+id/etAddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="1"
android:maxLines="3"
android:hint="@string/Address"/>
<EditText
android:id="@+id/etDirectSuperiorName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/DirectSuperiorName"
android:editable="false"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Leave Balance"
android:id="@+id/tvSisaCuti"
android:layout_marginTop="20dp" />
<EditText
android:id="@+id/etSisaCuti"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Sisa Cuti"
android:layout_marginTop="1dp"
android:editable="false"
android:paddingTop="10dp" />
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/lvProfile"
android:choiceMode="singleChoice"
android:headerDividersEnabled="false"
android:divider="@null"
android:dividerHeight="0dp"/>
</LinearLayout>
</ScrollView>
Design
Any help would be appreciate. Thanks fellas