October 2018
Intermediate to advanced
464 pages
15h 17m
English
Since this recipe is building on the previous recipe, most of the work is already done. We'll add an EditText element to the main activity so that we have something to send to SecondActivity. We'll use the (auto-generated) TextView view to display the message. The following are the complete steps:
<EditText android:id="@+id/editTextData" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toTopOf="@+id/button" />
The <Button> element that we created in the previous ...