Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

2.07 build url with params #310

Open
wants to merge 15 commits into
base: 1.01_hello_world
Choose a base branch
from
Expand Up @@ -23,13 +23,11 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;

import android.widget.ArrayAdapter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;



public class MainActivity extends ActionBarActivity {

@Override
Expand Down Expand Up @@ -70,6 +68,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
*/
public static class PlaceholderFragment extends Fragment {

ArrayAdapter<String> mForecastAdapter;

public PlaceholderFragment() {
}

Expand All @@ -88,6 +88,18 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
"Sun 6/29 - Sunny - 20/7"
};
List<String> weekForecast = new ArrayList<String>(Arrays.asList(data));


// Now that we have some dummy forecast data, create an ArrayAdapter.
// The ArrayAdapter will take data from a source (like our dummy forecast) and
// use it to populate the ListView it's attached to.
mForecastAdapter =
new ArrayAdapter<String>(
getActivity(), // The current context (this activity)
R.layout.list_item_forecast, // The name of the layout ID.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the layout should be more meaningful.

R.id.list_item_forecast_textview, // The ID of the textview to populate.
weekForecast);

View rootView = inflater.inflate(R.layout.fragment_main, container, false);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello

return rootView;
}
Expand Down