冲刺(一)
今天是冲刺的第一天,以前学过的Android控件什么的都忘了,简单的复习了一下。
页面的跳转
package com.mingrisoft; import android.content.Intent; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.View; public class Main2Activity extends ActionBarActivity implements View.OnClickListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); initUI(); } private void initUI() { findViewById(R.id.btn2).setOnClickListener(this); findViewById(R.id.btn3).setOnClickListener(this); findViewById(R.id.btn4).setOnClickListener(this); } @Override public void onClick(View view) { switch (view.getId()) { case R.id.btn2: //跳转到EditTextAxctivity界面 Intent intent = new Intent(); intent.setClass(getApplicationContext(), EditTextActivity.class); startActivity(intent); break; case R.id.btn3: //跳转到OutAxctivity界面 intent = new Intent(); intent.setClass(getApplicationContext(), OutActivity.class); startActivity(intent); break; case R.id.btn4: //跳转到InAxctivity界面 intent = new Intent(); intent.setClass(getApplicationContext(), InActivity.class); startActivity(intent); break; } } }