IndahAinur0909

logindesign_MainActivity.java

Jul 22nd, 2016
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. public class MainActivity extends AppCompatActivity {
  2. @Override
  3. protected void onCreate(Bundle savedInstanceState) {
  4. super.onCreate(savedInstanceState);
  5. setContentView(R.layout.activity_main);
  6. }
  7. @Override
  8. public boolean onCreateOptionsMenu(Menu menu) {
  9. // Inflate the menu; this adds items to the action bar if it is present.
  10. getMenuInflater().inflate(R.menu.menu_main, menu);
  11. return true;
  12. }
  13. @Override
  14. public boolean onOptionsItemSelected(MenuItem item) {
  15. // Handle action bar item clicks here. The action bar will
  16. // automatically handle clicks on the Home/Up button, so long
  17. // as you specify a parent activity in AndroidManifest.xml.
  18. int id = item.getItemId();
  19.  
  20. //noinspection SimplifiableIfStatement
  21. if (id == R.id.action_settings) {
  22. return true;
  23. }
  24. return super.onOptionsItemSelected(item);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment