Android Phone number Calling Function in an Activity
<p>I am developing Android Application having Contact Us Page having Phone Number. I had given the Phone number in xml file as below:</p>

<pre><code>&lt;TextView 
android:layout_height="wrap_content" 
android:textAppearance="?android:attr/textAppearanceSmall" 
android:text="1-869-270-9099" 
android:textSize="11sp"
android:textColor="#104082"
android:textStyle="normal"
android:layout_width="wrap_content" 
android:id="@+id/textView4" 
android:layout_x="72dp" 
android:layout_y="160dp"/&gt;
</code></pre>

<p>I had created the Alert Dialog Box and when the phone number is clicked the alert dialog box will be shown programatically as below:</p>

<pre><code>   @Override
   protected Dialog onCreateDialog(int id) {
    switch (id) {
    case (R.id.textView4):

        Builder builder = new AlertDialog.Builder(this);
        builder.setMessage("Do you want to Call?");
        builder.setCancelable(false);
        builder.setPositiveButton("Call", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
               //Do Calling a Number


            }
        });
        builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                    dialog.cancel();
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }
    return super.onCreateDialog(id);
}
       public void onClick(View v) {

    switch(v.getId()){
    case (R.id.textView4):

        showDialog(R.id.textView4);
    break;
    }

}
</code></pre>

<p>Here my issue is <strong>to implement the "Calling a Phone Number" Function in the   onClick "PositiveButton" method.</strong> Please help me how to get a DialPad with the number present in the xml file with the SampleCode/Links.</p>
