|
| 1 | +package com.vogella.android.gradlebuildflavors; |
| 2 | + |
| 3 | +import android.app.Activity; |
| 4 | +import android.os.Bundle; |
| 5 | +import android.view.Menu; |
| 6 | +import android.view.MenuItem; |
| 7 | +import android.view.View; |
| 8 | +import android.widget.TextView; |
| 9 | +import android.widget.Toast; |
| 10 | + |
| 11 | +public class MainActivity extends Activity { |
| 12 | + |
| 13 | + @Override |
| 14 | + protected void onCreate(Bundle savedInstanceState) { |
| 15 | + super.onCreate(savedInstanceState); |
| 16 | + setContentView(R.layout.activity_main); |
| 17 | + TextView viewById = (TextView) findViewById(R.id.larsseinetextview); |
| 18 | + viewById.setText(String.valueOf(ReturnIt.get())); |
| 19 | + } |
| 20 | + |
| 21 | + @Override |
| 22 | + public boolean onCreateOptionsMenu(Menu menu) { |
| 23 | + // Inflate the menu; this adds items to the action bar if it is present. |
| 24 | + getMenuInflater().inflate(R.menu.menu_main, menu); |
| 25 | + return true; |
| 26 | + } |
| 27 | + @Override |
| 28 | + public boolean onOptionsItemSelected(MenuItem item) { |
| 29 | + // Handle action bar item clicks here. The action bar will |
| 30 | + // automatically handle clicks on the Home/Up button, so long |
| 31 | + // as you specify a parent activity in AndroidManifest.xml. |
| 32 | + int id = item.getItemId(); |
| 33 | + |
| 34 | + //noinspection SimplifiableIfStatement |
| 35 | + if (id == R.id.action_settings) { |
| 36 | + return true; |
| 37 | + } |
| 38 | + |
| 39 | + return super.onOptionsItemSelected(item); |
| 40 | + } |
| 41 | +} |
0 commit comments