From 9bc972fe64579735d4c108db03dc90147dfa20da Mon Sep 17 00:00:00 2001 From: DjBushido Date: Mon, 7 Apr 2014 14:42:37 -0400 Subject: [PATCH] Add a way to statically initialize the News sites --- HW5/src/edu/uncc/itcs4180/hw5/MainActivity.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/HW5/src/edu/uncc/itcs4180/hw5/MainActivity.java b/HW5/src/edu/uncc/itcs4180/hw5/MainActivity.java index f8da40d..326b462 100644 --- a/HW5/src/edu/uncc/itcs4180/hw5/MainActivity.java +++ b/HW5/src/edu/uncc/itcs4180/hw5/MainActivity.java @@ -1,5 +1,9 @@ package edu.uncc.itcs4180.hw5; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + import edu.uncc.itcs4180.hw5.twitter.TweetList; import edu.uncc.itcs4180.hw5.twitter.TwitterClient; import android.os.Bundle; @@ -8,6 +12,14 @@ import android.util.Log; import android.view.Menu; public class MainActivity extends Activity { + + private static final Map newsSites; + static { + Map mMap = new HashMap(); + mMap.put("CNN Breaking News", "cnnbrk"); + + newsSites = Collections.unmodifiableMap(mMap); + } @Override protected void onCreate(Bundle savedInstanceState) {