今天学习了两个页面之间的数据传递,迫不及待的想的大家分享一下。
不要废话,请开始你的表演
不要急,我慢慢给你说
快点,我没时间
好,好,好
1.看图
完了!
完了?你是来骗点击量的吧!滚!!!!!!!~!
怎么可能,我还有后文。其实这是简单的入门,后面的都是建立在的基础上的。所以大家好好理解。
开始真正的表演:
1.首先建立两个页面,一个传递数据,一个接受数据。
2.activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="10dp"
tools:context=".MainActivity">
<ImageView
android:id="@+id/im