diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-02-14 10:01:07 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-02-14 10:01:07 +0100 |
commit | a43a6e3ea279a58815edafaf552a571789835e7f (patch) | |
tree | 835abf534c451ce5a41b281b53345753126aefbc /same-android/src/main/java/com/orbekk/same/MainActivity.java | |
parent | 10920b6036c13f82df151e5912f6b1fbbd7aca02 (diff) |
Rename com.orbekk{=>.same} in Android project.
Diffstat (limited to 'same-android/src/main/java/com/orbekk/same/MainActivity.java')
-rw-r--r-- | same-android/src/main/java/com/orbekk/same/MainActivity.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/same-android/src/main/java/com/orbekk/same/MainActivity.java b/same-android/src/main/java/com/orbekk/same/MainActivity.java new file mode 100644 index 0000000..49053c8 --- /dev/null +++ b/same-android/src/main/java/com/orbekk/same/MainActivity.java @@ -0,0 +1,31 @@ +package com.orbekk.same; + +import com.orbekk.R; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.widget.Toast; + +public class MainActivity extends Activity { + @Override public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + } + + @Override public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.main_menu, menu); + return true; + } + + @Override public boolean onOptionsItemSelected(MenuItem item) { + if (item.getItemId() == R.id.same_settings) { + startActivity(new Intent(this, SameControllerActivity.class)); + } + return true; + } +} |