Difference between revisions of "Team:Bielefeld-CeBiTec/Software/SourceCode"
Line 7: | Line 7: | ||
$("#sourcecode").addClass("navbar-active"); | $("#sourcecode").addClass("navbar-active"); | ||
</script> | </script> | ||
+ | <title>Analysis.java</title> | ||
+ | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
+ | <style type="text/css"> | ||
+ | .ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; } | ||
+ | .s0 { color: rgb(0,0,128); font-weight: bold; } | ||
+ | .s1 { } | ||
+ | .s2 { color: rgb(128,128,128); font-style: italic; } | ||
+ | </style> | ||
</head> | </head> | ||
+ | <BODY BGCOLOR="#ffffff"> | ||
+ | <TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0" > | ||
+ | <TR><TD><CENTER> | ||
+ | <FONT FACE="Arial, Helvetica" COLOR="#000000"> | ||
+ | Analysis.java</FONT> | ||
+ | </center></TD></TR></TABLE> | ||
+ | <pre> | ||
− | < | + | <span class="s0">package </span><span class="s1">de.anna.cellfreestick; |
− | < | + | |
− | < | + | |
− | + | ||
− | + | </span><span class="s0">import </span><span class="s1">android.support.v7.app.ActionBarActivity; | |
− | + | </span><span class="s0">import </span><span class="s1">android.os.Bundle; | |
− | + | </span><span class="s0">import </span><span class="s1">android.view.Menu; | |
+ | </span><span class="s0">import </span><span class="s1">android.view.MenuItem; | ||
− | |||
− | |||
− | |||
− | |||
− | + | </span><span class="s0">public class </span><span class="s1">Analysis </span><span class="s0">extends </span><span class="s1">ActionBarActivity { | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | @Override | |
− | + | </span><span class="s0">protected void </span><span class="s1">onCreate(Bundle savedInstanceState) { | |
− | + | </span><span class="s0">super</span><span class="s1">.onCreate(savedInstanceState); | |
− | + | setContentView(R.layout.activity_analysis); | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | </ | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | </ | + | @Override |
+ | </span><span class="s0">public boolean </span><span class="s1">onCreateOptionsMenu(Menu menu) { | ||
+ | </span><span class="s2">// Inflate the menu; this adds items to the action bar if it is present.</span><span class="s1"> | ||
+ | getMenuInflater().inflate(R.menu.menu_analysis, menu); | ||
+ | </span><span class="s0">return true</span><span class="s1">; | ||
+ | } | ||
+ | |||
+ | @Override | ||
+ | </span><span class="s0">public boolean </span><span class="s1">onOptionsItemSelected(MenuItem item) { | ||
+ | </span><span class="s2">// Handle action bar item clicks here. The action bar will</span><span class="s1"> | ||
+ | </span><span class="s2">// automatically handle clicks on the Home/Up button, so long</span><span class="s1"> | ||
+ | </span><span class="s2">// as you specify a parent activity in AndroidManifest.xml.</span><span class="s1"> | ||
+ | </span><span class="s0">int </span><span class="s1">id = item.getItemId(); | ||
+ | |||
+ | </span><span class="s2">//noinspection SimplifiableIfStatement</span><span class="s1"> | ||
+ | </span><span class="s0">if </span><span class="s1">(id == R.id.action_settings) { | ||
+ | </span><span class="s0">return true</span><span class="s1">; | ||
+ | } | ||
+ | |||
+ | </span><span class="s0">return super</span><span class="s1">.onOptionsItemSelected(item); | ||
+ | } | ||
+ | } | ||
+ | </span></pre> | ||
+ | |||
</body> | </body> |
Revision as of 21:14, 13 September 2015
package de.anna.cellfreestick; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; public class Analysis extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_analysis); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_analysis, 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(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }