Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6781775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:39:50+00:00 2026-05-26T16:39:50+00:00

I am developing Android Application having ContactUs Page having Phone Number. I had given

  • 0

I am developing Android Application having ContactUs Page having Phone Number. I had given the Phone number in xml file as below:

<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"/>

I had created the AlertDialog and when the phone number is clicked the alert dialog will be shown programatically as below:

   @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;
    }

}

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:39:51+00:00Added an answer on May 26, 2026 at 4:39 pm

    Maybe something like:

    Intent call = new Intent(Intent.ACTION_DIAL);
    call.setData(Uri.parse("tel:" + findViewByid(R.id.textView4).getText());
    startActivity(call);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am about to start developing an Android application and had a question if
I'm developing an augmented reality application for Android that uses the phone's camera to
I am having trouble with developing my Android application, I am currently using Eclipse
I'm having a go at developing my first android application and have never really
I am developing Android Application having the listview in an activity . I implemented
I am developing one Android application having the list view of items. Those listview
I am developing Android Application. In which i am having list view with text
I'm now to android. And I'm having trouble in developing application in which I'm
I'm developing an application for Android that installs stuff on the phone's sim card.
I'm developing an Android application that uses a WebView to display the login page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.