I display a ListView that should contain a TextView followed by a ProgressBar (underneath it).
So far I only display a TextViews like such:
In my Activity.xml:
<fragment
android:id="@+id/routineFragment"
android:name="kade_c.trakr.fragments.RoutineListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
In my RoutineListFragment.java that extends ListFragment:
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
ArrayAdapter adapter = ArrayAdapter.createFromResource(getActivity(),
R.array.routine, android.R.layout.simple_list_item_1);
setListAdapter(adapter);
getListView().setOnItemClickListener(this);
}
And finally my fragment_routine_list.xml that contains my ListView:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/RoutineLayout">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
How may I add a ProgressBar under each TextView contained in my ListView?
Forgive me if this question is too broad, but I can't seem to find an answer anywhere.