![]() Ok, now we are done with the design phase. In the new layout, let's name it dialog_prompt_user.xml, add the following XML codes and save.Īnd finally, modify the /rest/values/layout/activity_main_alert_dialog.xml file, by a adding a new TextView: Right click layout and navigate to Layout Resource File such as shown in the image below: Next, let's move to res/layout and create a new layout. ![]() Basically, we just add the EditText string input box to prompt the user to enter his/her username.įirst, navigate the project structure in Android Studio and open up res/values/strings.xml file.Īdd Enter your user name here. The following is a modification of previous tutorial activity_main_alert_dialog.xml file. In this tutorial, we will learn how to add an EditText string box to get the user input and display the entry on the main activity layout, such as shown below: ![]() This is a supplementary tutorial for the previous tutorial on how to get user attention with AlertDialog. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |