<?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:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_1"
android:gravity="center"
android

rientation="vertical"
tools:context=".Menu">
<TextView
android:id="@+id/frage2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:gravity="center"
android:text="Welche folg. Tätigkeiten interessieren dich?"
android:textColor="@color/white"
android:textSize="19sp" />
<Button
android:id="@+id/f2_b1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="technische Anlagen und Maschinen bedienen" />
<Button
android:id="@+id/f2_b2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="in wichtigen Projekten die Verantwortung übernehmen" />
<Button
android:id="@+id/f2_b3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="Menschen zu etwas motivieren" />
<Button
android:id="@+id/f2_weiter"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="80dp"
android:layout_marginRight="10dp"
android:text="weiter" />
</LinearLayout>
------------------------------------------------------------------------------------------------
package com.example.meineapp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Zweite_Frage extends AppCompatActivity {
private Button f2_weiter;
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_zweite_frage);
f2_weiter = (Button) findViewById(R.id.f2_weiter);
f2_weiter.setOnClickListener(new View.OnClickListener() {
@override
public void onClick(View v) {
openDritte_Frage();
}
});
}
public void openDritte_Frage() {
Intent intent = new Intent(this, Dritte_Frage.class);
startActivity(intent);
}
}