Add one EditText and one Button, do this however you want but just make sure you give the items ID's so we can find them from our java sources. Create a new project, choose Empty Activity and locate activity_main.xml in the folder app/res/layout and open it up. Let's start by adding the input field and button in the main activity so we have something to play with as soon as possible. The intent is grabbing your text with it and transports it to the other activity where it can be picked up and displayed. How does this app work, you ask? Basically, the app lets you input some value in the input field, then you click on a button to start a new activity using a intent. This will let us bring our data from one activity to another easily. "An Intent is a messaging object you can use to request an action from another app component ( )". In this article you will learn how to pass data between activities in Android Studio using Java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |