WEB开发网
开发学院手机开发Android 开发 android 开发之activity之间传递数据 阅读

android 开发之activity之间传递数据

 2010-07-05 00:08:00 来源:WEB开发网   
核心提示: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 [复制链接] [打 印]
赞助商链接