Main activity is a two list, click on the child table a package to be passed to the next acvitvty bean
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
With intent
Reply:
/ / Pass data using parameters
BundleIntent intent = new Intent ();
intent.setClass (MainActivity.this, TwoActivity.class);
Bundle bundle = new Bundle ();
bundle.putString ("name", "hello");
bundle.putString ("pwd", "123");
intent.putExtras (bundle);
startActivity (intent);
Another activity values:
Bundle bundle = this.getIntent () getExtras ();.
String strName = bundle.getString ("name");
String strPwd = bundle.getString ("pwd");
txtTitle.setText ("Welcome:" + strName + "pwd:" + strPwd);
Reply:
intent .. putExtra (name, value); another activity. . getIntent () getExtra (name);
Reply:
intent.setclass (a.class, b.class)
No comments:
Post a Comment