WEB开发网      婵犻潧鍊婚弲顐︽偟椤栨稓闄勯柦妯侯槸閻庤霉濠婂骸浜剧紒杈ㄥ笚閹峰懘鎮╅崹顐ゆ殸婵炴垶鎸撮崑鎾趁归悩鐑橆棄闁搞劌瀛╃粋宥夘敃閿濆柊锕傛煙鐎涙ê鐏f繝濠冨灴閹啴宕熼鍡╀紘婵炲濮惧Λ鍕叏閳哄懎绀夋繛鎴濈-楠炪垽鎮归崶褍妲婚柛銊ュ缁傚秹鏁撻敓锟� ---闂佹寧娲╅幏锟�
开发学院手机开发Android 开发 android 开发之activity之间传递数据 阅读

android 开发之activity之间传递数据

 2010-07-05 00:08:00 来源:WEB开发网 闂侀潧妫撮幏锟�闂佸憡鍨电换鎰版儍椤掑倵鍋撳☉娆嶄沪缂傚稄鎷�婵犫拃鍛粶闁靛洤娲ㄩ埀顒佺⊕閵囩偟绱為敓锟�闂侀潧妫撮幏锟�  闂佺ǹ绻楀▍鏇㈠极閻愬搫绾ч柕濠忕細閼割亜顪冪€n剙浠ф繛鍫熷灥椤曘儵顢欓悡搴ば�
核心提示:String s=nf.format(num);return s;}private String getWeight(String sex,double height){String weight="";if (sex.equals("M")){weight=format((he

String s=nf.format(num);

return s;

}

private String getWeight(String sex,double height)

{

String weight="";

if (sex.equals("M"))

{

weight=format((height-80)*0.7);

}

else

{

weight=format((height-70)*0.6);

}

return weight;

}

}

---------------mann.xml-----------------

< ?xml version="1.0" encoding="utf-8"?>

< RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:paddingBottom="4dip"

android:paddingLeft="12dip"

android:paddingTop="4dip"

android:paddingRight="12dip"

>

< p>

android:id="@+id/title_view"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="@string/hello"

/>

< TextView

android:id="@+id/text_title"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:textSize="20sp"

android:layout_below="@+id/title_view"

android:text="@string/str_text"

/>

< TextView

android:id="@+id/text_weight"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:textSize="20sp"

android:layout_below="@+id/text_title"

android:text="@string/str_weight"

/>

< RadioGroup

android:id="@+id/RadioGroup01"

android:layout_width="wrap_content"

android:layout_below="@+id/text_title"

android:layout_toRightOf="@+id/text_weight"

上一页  1 2 3 4 5 6 7 8  下一页

Tags:android 开发 activity

编辑录入:coldstar [复制链接] [打 印]
赞助商链接