页脚下载后可删除,如有侵权请告知删除!
安卓开发实验报告
目录
页面跳转
长按图标抖动以及显示删除
页面跳转
功能:通过点击button实现2个activity之间的跳转。
页脚下载后可删除,如有侵权请告知删除!
完整代码
public class UI_Test extends Activity {
***@Override
protected void onCreate(Bundle savedInstanceState) {
(savedInstanceState);
setContentView();
Button bt = (Button)findViewById();
(new OnClickListener());
}
class OnClickListener implements {
public void onClick(View v){
EditText name = (EditText)findViewById();
EditText password = (EditText)findViewById();
Bundle data=new Bundle();
("name", ().toString());
("password", ().toString());
Intent intent = new Intent(,);
(data);
startActivity(intent);
}
}
public class UI_Result extends Activity {
***@Override
protected void onCreate(Bundle savedInstanceState) {
(savedInstanceState);
setContentView();
TextView name = (TextView)findViewById();
TextView password = (TextView)findViewById();
Intent intent=getIntent();
Bundle result = ();
("您的用户名为: "+("name"));
("您的密码为: "+("password"));
页脚下载后可删除,如有侵权请告知删除!
}
}
<?xml version="" encoding="utf-8"?>
<TableLayout xmlns:android=" :// /apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height=
安卓开发实验报告 来自淘豆网m.daumloan.com转载请标明出处.