正在加载图片...
Extra An Intent carries additional information through Extra o Extras are Key-value pairs You can add extra data with various putExtra() methods,each accepting two parameters:the key name and the value. o putExtra(String name,int value),putExtra(String name, float value),putExtra(String name,byte value) You can also create a Bundle object with all the extra data,then insert the Bundle in the Intent with putExtras() Bundle data new Bundle(); bundle.putstring("key_name","name"); bundle.putString("key_age","age"); intent.putExtras(data); 15Extra • An Intent carries additional information through Extra o Extras are Key-value pairs • You can add extra data with various putExtra() methods, each accepting two parameters: the key name and the value. o putExtra(String name, int value), putExtra(String name, float value), putExtra(String name, byte value) • You can also create a Bundle object with all the extra data, then insert the Bundle in the Intent with putExtras() 15 Bundle data = new Bundle(); bundle.putString("key_name", "name"); bundle.putString("key_age", "age"); intent.putExtras(data);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有