The theory of adapter and listview :
We have 3 Raw dataFirst
This can prevent to cover other
<? xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_item_forecast_textview" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Todat-sunny-88/63" android:gravity="center_vertical" android:minHeight="?android:attr/listPreferredItemHeight"/>
Second, Create Array Adapter
aa = new ArrayAdapter<String>(getActivity ( ), R. layout. list_itemforecast, R. id. list_item_forecast_textview,weekForcast );
R. id. list_item_forecast_textview is a iteam in the list_itemforecast.xml to show the information
Third, give the adapter to the List View
ListView listview_forecast = (ListView) rootView.findViewById(R.id.listview_forecast); listview_forecast.setAdapter(aa); listview_forecast.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?>parent , View view, int position, long id) { Toast. makeText ( getActivity ( ), aa. getItem ( position), Toast. LENGTH_LONG). show( );}}) ;