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 7838339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:04:32+00:00 2026-06-02T15:04:32+00:00

I built an AlertDialog in this class file, and the dialog box is coming

  • 0

I built an AlertDialog in this class file, and the dialog box is coming up fine, however the methods dont seem to be calling when a click is performed. What am I doing wrong? Thanks for your help!

//AlertView Builder
    final AlertDialog.Builder builder;
    builder = new AlertDialog.Builder(this);
    builder.setTitle(" ");
    builder.setIcon(R.drawable.banner);
    builder.setMessage("Share this picture using any of the below!");

    builder.setPositiveButton("Email",
            new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                  System.out.print("Emailing...");
                }
            });

    builder.setNeutralButton("Facebook",
            new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                    System.out.print("Facebooking...");
                }
            });

    builder.setNegativeButton("Twitter",
            new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                    System.out.print("Tweeting...");
                }
            });
  • 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-06-02T15:04:34+00:00Added an answer on June 2, 2026 at 3:04 pm

    What are you expecting it to do? do you have any code in those blocks that you don’t have up there right now?

    Android doesn’t by default use System.out.print(); for anything – use Log:

    Log.d(getClass().getName(),"Facebooking...");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I built a linear layout inside of a dialog , the problem here that
i built my own infinitescroll similar to the google image search. Everythings works fine.
I built a simple voting system: votes_controller.rb: class VotesController < ApplicationController def vote_up @post
Is there a way to use my own Dialog-extended class with an AlertBuilder style?
I built a framework using OSX 10.6 and everything is fine, I have the
I built a project to iPhone and debugging it in Xcode 4.3.2 works fine.
I built a rudimentary page navigation system with jQuery . You click the next
My code: package com.example.linkingpage; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent;
I'm trying to build an AlertDialog using Builder. My dialog has to have multiple
I've built an AlertDialog using a cursor to populate the list items in the

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.