Create a Phone calling app in android studio

Technical Coding
In this tutorial we are gonna learn create an phone calling app in our Android studio. In this tutorial for use internet services to create this app.

1. First we create the layout

In this example and simply use the relative layout you can use any layout you want. inside the layout i'm going to add an image button and an edittext. And we will set that text's input type to numbers so users only can enter numbers in our edittext. Use attribute android:inputType="number". Now add a imageButton below of the edittext. Give Ids to both of them.

Note: I use ImageButton like that for a better view you can use a normal button also because we only focusing on coding not degining. 

2. Moving onto the coding Part

Now lets go to the Mainactivity.java and create variable of button and edittext, connect it to their following Ids. And now call setOnClickListerner on it. Inside the Onclick method create a string to store the number that user has entered. 
String phoneNumber = edittext.getText().toString();


Post a Comment

0 Comments