package edu.yalestc.yalepublic;

import android.app.ActionBar;
import android.app.Activity;
import android.os.Bundle;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

/**
 * Created by Jason Liu on 10/18/14.
 */
public class MapSearch extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActionBar actionbar = getActionBar();
        actionbar.setDisplayHomeAsUpEnabled(true);     // Show home as a back arrow
        //actionbar.setDisplayShowHomeEnabled(true);     // Show application logo
        actionbar.setDisplayShowTitleEnabled(true);    // Show activity title/subtitle
        actionbar.setDisplayUseLogoEnabled(false);     // Use activity logo instead of activity icon
        actionbar.setTitle(getString(R.string.maps));  // Set title

        setContentView(R.layout.map_simple);

        // Get a handle to the Map Fragment
        GoogleMap map = ((MapFragment) getFragmentManager()
                .findFragmentById(R.id.map)).getMap();

        LatLng yale = new LatLng(41.3111, -72.9267);   // The - signifies the Western Hemisphere

        map.setMyLocationEnabled(true);
        map.moveCamera(CameraUpdateFactory.newLatLngZoom(yale, 13));

        map.addMarker(new MarkerOptions()
                .title("Yale")
                .snippet("The best university ever.")
                .position(yale));
    }

}

@@ -85,16 +85,81 @@
 tivity;%0A
+import android.app.SearchManager;%0Aimport android.content.Intent;%0A
 import a
@@ -468,16 +468,16 @@
  on 
-10/18/14
+01/24/15
 .%0A *
@@ -1112,16 +1112,295 @@
 %0A       
+ // Get the intent, verify the action and get the query%0A        Intent intent = getIntent();%0A        if (Intent.ACTION_SEARCH.equals(intent.getAction())) %7B%0A            String query = intent.getStringExtra(SearchManager.QUERY);%0A            doMySearch(query);%0A        %7D%0A%0A        /*
  setCont
@@ -1962,14 +1962,363 @@
 e));
+ */%0A%0A    %7D%0A%0A    @Override%0A    protected void onNewIntent(Intent intent) %7B%0A        super.onNewIntent(intent);%0A        if (Intent.ACTION_SEARCH.equals(intent.getAction())) %7B%0A            String query = intent.getStringExtra(SearchManager.QUERY);%0A            doMySearch(query);%0A        %7D%0A    %7D%0A%0A    private void doMySearch(String query) %7B%0A        return;
 %0A    %7D%0A
-%0A
 %7D%0A

Add search stubs