在Android中,可以通过静态变量传递数据,类似于iOS中的属性传值,从前一个页面将值传给弹出后的页面。
下面通过一个demo来演示这个过程。
1、在activity_main.xml中增加一个按钮
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="使用静态变量传递数据"/>
</