Created
May 25, 2020 07:25
-
-
Save BMU-Verlag/3587210d854e27096a143abc92a7bbff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.ersteapp; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.EditText; | |
public class MainActivity extends AppCompatActivity { | |
public static final String AUSGABE = "com.example.ersteapp.NACHRICHT"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} | |
public void begruessungAusgeben(View view) { | |
Intent intent = new Intent(this, Begruessung.class); | |
EditText editText = (EditText) findViewById(R.id.editText); | |
String inhalt = editText.getText().toString(); | |
intent.putExtra(AUSGABE, inhalt); | |
startActivity(intent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment