I am trying to make a horizontal scroll view inside a ListView. I have a ListView working, but inputting data into horizontalscrollview (HSV) does not work for me. Please advise! (I have encoded the list, tested it and am now trying to add horizontalscrollview)
HSV will be for each list.
So, basically for my logic on how I approach this: I have my own listview adapter, I decided to put the HSV inside the adapter so that it goes through each listItem and puts the HSV in it.
My Xml looks like this:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:baselineAligned="false" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="0dip" android:layout_weight="1" android:layout_height="fill_parent"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtProjectName" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtProjectDescription" /> <HorizontalScrollView android:layout_width="wrap_content" android:layout_height="match_parent" > <LinearLayout android:id="@+id/projectTasks" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtProjectTasks" /> </LinearLayout> </HorizontalScrollView> </LinearLayout> </LinearLayout>
Then I created a custom adapter to run all projects.
public class ProjectListAdapter extends ArrayAdapter<Projects> { int resource; String response; Context context; ArrayList<Tasks> taskArray = null;
}
This last bit of code is where the adapter will go through the HSV, but something is not working, as I would like, please help!
source share