Android_03之intent.ppt
文本预览下载声明
Android QQ:349527531 coffee Android Intent Intent之传值 Android Intent(发送方的Activity) //实例化对象 Intent intent=new Intent( ); //单一传值 intent.putExtra(“username”,userEdite.getText().toString()) Android Intent(接收方的Activity) //获得对象 Intent intent=getIntent( ) //获得传值 intent.getStringExtra(“username”) Android Intent多个传值 //获得对象 Intent intent=getIntent( ) Bundle bundle=new Bundle( ) Android Intent多个传值 bundle.putString(“username”,userText.getText().toString()) bundle.putString(“password”,passwordText.getText().toString()) Intent.putExtras(bundle) Android Intent接收多个值 //获得对象 Bundle bundle=this.getIntent().getExtras() String username=bundle.getString(“username”); String password=bundle.getString(“password”)
显示全部