-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Android Studio 4.1 Development Essentials – Java Edition
By :

54.6 Extracting Intent Data
Now that ActivityB is being launched from MainActivity, the next step is to extract the String data value included in the intent and assign it to the TextView object in the ActivityB user interface. This involves adding some code to the onCreate() method of ActivityB in the ActivityB.java source file:
package com.ebookfrenzy.explicitintent;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
import android.widget.TextView;
import android.widget.EditText;
public class ActivityB extends AppCompatActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activityb);
...
Change the font size
Change margin width
Change background colour