1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > android实现电话功能实验报告 安卓开发实验报告-0407005833.docx-原创力文档

android实现电话功能实验报告 安卓开发实验报告-0407005833.docx-原创力文档

时间:2023-10-24 11:57:12

相关推荐

android实现电话功能实验报告 安卓开发实验报告-0407005833.docx-原创力文档

文档编制序号:[KKIDT-LLE0828-LLETD298-POI08]

文档编制序号:[KKIDT-LLE0828-LLETD298-POI08]

安卓开发实验报告

安卓开发实验报告

目录

页面跳转

长按图标抖动以及显示删除

页面跳转

功能:通过点击button实现2个activity之间的跳转。

1.设置监听器监听点击button

2.使用intent传输数据

完整代码

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);

}

}

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"));

}

}

version="" encoding="utf-8">

android:layout_width="fill_parent"

android:layout_height="fill_parent"

>

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="请输入您的信息"

android:textSize="20sp"

/>

android:id="@+id/tableRow1"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

>

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="用户名"

android:textSize="16sp"

/>

android:id="@+id/name"

android:layout_width="fill_parent"

an

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。