package com.beepscore.android.sunshine;

import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.TextView;

//import java.text.DateFormat;
import java.util.ArrayList;
//import java.util.Calendar;
//import java.util.Date;
import java.util.List;


/**
 * A placeholder fragment containing a simple view.
 */
public class MainActivityFragment extends Fragment {

    public MainActivityFragment() {
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View fragmentMainView = inflater.inflate(R.layout.fragment_main, container, false);
        configureList();
        return fragmentMainView;
    }

    private void configureList() {
        List<String> list = new ArrayList<String>;

        list.add("Today - Sunny - 88/63");
        list.add("Tomorrow - Foggy - 70/46");
        list.add("Weds - Cloudy - 72/63");
        list.add("Thurs - Rainy - 64/51");
        list.add("Fri - Foggy - 70/46");
        list.add("Sat - Sunny - 76/68");
    }

}

@@ -219,16 +219,15 @@
 get.
-ListView
+Adapter
 ;%0Aim
@@ -250,130 +250,49 @@
 get.
-TextView;%0A%0A//import java.text.DateFormat;%0Aimport java.util.ArrayList;%0A//import java.util.Calendar;%0A//import java.util.Date
+ArrayAdapter;%0A%0Aimport java.util.ArrayList
 ;%0Aim
@@ -467,24 +467,82 @@
 () %7B%0A    %7D%0A%0A
+    List%3CString%3E weekForecast = new ArrayList%3CString%3E();%0A%0A
     @Overrid
@@ -793,24 +793,25 @@
 List();%0A
+%0A
         
 return f
@@ -806,137 +806,418 @@
     
-return fragmentMainView;
+// adapter creates views for each list item
 %0A    
-%7D%0A%0A
     
-private void configureList() %7B%0A        List%3CString%3E list = new ArrayList%3CString%3E;%0A%0A        li
+Adapter adapter = new ArrayAdapter%3CString%3E(getActivity(),%0A                R.layout.list_item_forecast,%0A                R.id.list_item_forecast_textview,%0A                weekForecast);%0A%0A        View listView = fragmentMainView.findViewById(R.id.listview_forecast);%0A%0A        return fragmentMainView;%0A    %7D%0A%0A    private void configureList() %7B%0A        weekForeca
 st.a
@@ -1245,34 +1245,42 @@
 8/63%22);%0A        
-li
+weekForeca
 st.add(%22Tomorrow
@@ -1299,34 +1299,42 @@
 0/46%22);%0A        
-li
+weekForeca
 st.add(%22Weds - C
@@ -1350,34 +1350,42 @@
 2/63%22);%0A        
-li
+weekForeca
 st.add(%22Thurs - 
@@ -1401,34 +1401,42 @@
 4/51%22);%0A        
-li
+weekForeca
 st.add(%22Fri - Fo
@@ -1458,18 +1458,26 @@
         
-li
+weekForeca
 st.add(%22

Add adapter, get listView. TODO: connect them