package k57ca.pmp.askeverywhere;

import android.app.Activity;
import android.app.ActionBar;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		if (savedInstanceState == null) {
			getFragmentManager().beginTransaction()
					.add(R.id.container, new PlaceholderFragment()).commit();
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {

		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle action bar item clicks here. The action bar will
		// automatically handle clicks on the Home/Up button, so long
		// as you specify a parent activity in AndroidManifest.xml.
		int id = item.getItemId();
		if (id == R.id.action_settings) {
			return true;
		}
		return super.onOptionsItemSelected(item);
	}

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

		public PlaceholderFragment() {
		}

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

}

@@ -60,38 +60,8 @@
 ty;%0A
-import android.app.ActionBar;%0A
 impo
@@ -263,33 +263,8 @@
 oup;
-%0Aimport android.os.Build;
 %0A%0Apu
@@ -667,129 +667,173 @@
 ) %7B%0A
-%0A
 %09%09
-// Inflate the menu; this adds items to the action bar if it is present.%0A%09%09getMenuInflater().inflate(R.menu.main, menu
+super.onCreateOptionsMenu(menu);%0A%09%09int base = Menu.FIRST;%0A%09%09MenuItem newsfeed = menu.add(base, 1, 1, %22Newsfeed%22);%0A%09%09MenuItem search = menu.add(base, 2, 2, %22Google%22
 );%0A%09
@@ -1109,17 +1109,16 @@
 .%0A%09%09
-int id = 
+switch (
 item
@@ -1133,66 +1133,136 @@
 Id()
-;%0A%09%09if (id == R.id.action_settings) %7B
+) %7B%0A%09%09case 1:%0A%09%09%09IntentsUtils.newsfeed(this);
 %0A%09%09%09
+b
 re
-turn true;%0A%09%09%7D%0A
+ak;%0A%09%09case 2:%0A%09%09%09IntentsUtils.invokeWebBrowser(this);%0A%09%09%09break;%0A%09%09default:%0A%09
 %09%09re
@@ -1301,16 +1301,35 @@
 (item);%0A
+%09%09%7D%0A%09%09return true;%0A
 %09%7D%0A%0A%09/**

add IntentsUtils