Guest User

SpinnerActivity

a guest
Jan 7th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. package com.example.myapp;
  2.  
  3. import android.os.Bundle;
  4. import android.support.v7.app.ActionBarActivity;
  5. import android.view.Menu;
  6. import android.view.MenuItem;
  7.  
  8. public class SpinnerActivity extends ActionBarActivity {
  9.  
  10. @Override
  11. protected void onCreate(Bundle savedInstanceState) {
  12. super.onCreate(savedInstanceState);
  13. setContentView(R.layout.activity_spinner);
  14. }
  15.  
  16. @Override
  17. public boolean onCreateOptionsMenu(Menu menu) {
  18. // Inflate the menu; this adds items to the action bar if it is present.
  19. getMenuInflater().inflate(R.menu.spinner, menu);
  20. return true;
  21. }
  22. @Override
  23. public boolean onOptionsItemSelected(MenuItem item) {
  24. // Handle action bar item clicks here. The action bar will
  25. // automatically handle clicks on the Home/Up button, so long
  26. // as you specify a parent activity in AndroidManifest.xml.
  27. int id = item.getItemId();
  28. if (id == R.id.action_settings) {
  29. return true;
  30. }
  31. return super.onOptionsItemSelected(item);
  32. }
  33.  
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment