Back to project page AndroidText.
The source code is released under:
Apache License
If you think the Android project AndroidText listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jiechic.androidtext; /*from w w w . j a v a 2 s. c om*/ import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import com.jiechic.androidtext._1_daemon._1_DaemonActivity; public class MainActivity extends coreActivity implements View.OnClickListener { private Button _1_daemon; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initView(); } private void initView() { _1_daemon = (Button) findViewById(R.id._1_daemon); _1_daemon.setOnClickListener(this); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, 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(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @Override public void onClick(View v) { Intent intent=new Intent(); switch (v.getId()){ case R.id._1_daemon: intent.setClass(MainActivity.this,_1_DaemonActivity.class); break; default: intent.setClass(MainActivity.this,MainActivity.class); break; } intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } }