mirror of
https://github.com/bspeice/itcs4180
synced 2024-11-13 19:08:20 -05:00
Add a way to statically initialize the News sites
This commit is contained in:
parent
cd3233daaa
commit
9bc972fe64
@ -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<String, String> newsSites;
|
||||
static {
|
||||
Map<String, String> mMap = new HashMap<String, String>();
|
||||
mMap.put("CNN Breaking News", "cnnbrk");
|
||||
|
||||
newsSites = Collections.unmodifiableMap(mMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
Loading…
Reference in New Issue
Block a user