![]() These Operations are as follows:Īdd the listener to the send button and this button will send the data. Send_text = findViewById(R.id.send_text_id) Setting up the Operations for the Sending and Receiving of Data. Syntax: General ComponentType object = (ComponentType)findViewById(R.id.IdOfTheComponent) Syntax: for components used is as follows: Button send_button= findViewById(R.id.send_button_id) This method binds the created object to the UI Components with the help of the assigned ID. For this, open the “first_activity” file and instantiate the components made in the XML file (EditText, send Button) using findViewById() method. Now, after the UI, this step will create the Backend of the App. Comments are added inside the code to understand the code in more detail. Below is the code for the MainActivity File. Go to the MainActivity File and refer to the following code. Step 3: Working with the MainActivity File
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |