I have multiple linear layout in this layout.The scroll view is working when i am fully scrolled the item, but not in list view.My list view have multiple list items it show only one list item at a time thanks help me.....
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/taskscrollviewid"
android:layout_width="match_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:scrollbars="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="@+id/txtdate"
android:layout_width="0dip"
android:layout_height="30px"
android:layout_weight="1"
android:background="@drawable/taskbuttonselector" />
<Button
android:id="@+id/btnTaskTimeid"
android:layout_width="0dip"
android:layout_height="30px"
android:layout_weight="1"
android:background="@drawable/taskbuttonselector" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal" >
<EditText
android:id="@+id/txtItem"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/edittextselector"
android:drawableEnd="@drawable/inbox"
android:gravity="top|left"
android:hint="Enter task"
android:inputType="textMultiLine"
android:maxLines="5"
android:minLines="3"
android:scrollbars="vertical"
android:singleLine="false" />
<ImageButton
android:id="@+id/imagebuttonid"
android:layout_width="31dp"
android:layout_height="36dp"
android:layout_gravity="right|bottom"
android:background="@drawable/inbox" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="@+id/btnaddcategoryid"
android:layout_width="0dip"
android:layout_height="30px"
android:layout_weight="1"
android:background="@drawable/taskbuttonselector"
android:text="AddCategory" />
<Button
android:id="@+id/btnaddseverityid"
android:layout_width="0dip"
android:layout_height="30px"
android:layout_weight="1"
android:background="@drawable/taskbuttonselector"
android:text="AddSeverity" />
</LinearLayout>
<Button
android:id="@+id/btnadddb"
android:layout_width="wrap_content"
android:layout_height="30px"
android:layout_gravity="center|center_horizontal"
android:layout_marginTop="10dp"
android:background="@drawable/taskbuttonselector"
android:text="Add This Task" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:id="@+id/fillbut"
android:layout_width="0dip"
android:layout_height="30px"
android:layout_weight="1"
android:background="@drawable/taskbuttonselector"
android:text="Remain Task" />
<Button
android:id="@+id/remainbut"
android:layout_width="0dip"
android:layout_height="30px"
android:layout_weight="1"
android:background="@drawable/taskbuttonselector"
android:text="Finish Task" />
</LinearLayout>
<ListView
android:id="@+id/listid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:clickable="true"
android:orientation="vertical" >
</ListView>
</LinearLayout>
</ScrollView>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…