198796b464984574c1abe362478c9f47bda62fe7eDeepanshu Guptapackage com.android.layoutlib.test.myapplication; 298796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta 398796b464984574c1abe362478c9f47bda62fe7eDeepanshu Guptaimport android.app.Activity; 498796b464984574c1abe362478c9f47bda62fe7eDeepanshu Guptaimport android.os.Bundle; 598796b464984574c1abe362478c9f47bda62fe7eDeepanshu Guptaimport android.view.Menu; 698796b464984574c1abe362478c9f47bda62fe7eDeepanshu Guptaimport android.view.MenuItem; 798796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta 898796b464984574c1abe362478c9f47bda62fe7eDeepanshu Guptapublic class MyActivity extends Activity { 998796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta 1098796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta @Override 1198796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta protected void onCreate(Bundle savedInstanceState) { 1298796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta super.onCreate(savedInstanceState); 1398796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta setContentView(R.layout.activity); 1498796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta } 1598796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta 1698796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta 1798796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta @Override 1898796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta public boolean onCreateOptionsMenu(Menu menu) { 1998796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta // Inflate the menu; this adds items to the action bar if it is present. 2098796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta getMenuInflater().inflate(R.menu.my, menu); 2198796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta return true; 2298796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta } 2398796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta 2498796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta @Override 2598796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta public boolean onOptionsItemSelected(MenuItem item) { 2698796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta // Handle action bar item clicks here. The action bar will 2798796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta // automatically handle clicks on the Home/Up button, so long 2898796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta // as you specify a parent activity in AndroidManifest.xml. 2998796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta int id = item.getItemId(); 3098796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta if (id == R.id.action_settings) { 3198796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta return true; 3298796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta } 3398796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta return super.onOptionsItemSelected(item); 3498796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta } 3598796b464984574c1abe362478c9f47bda62fe7eDeepanshu Gupta} 36