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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:33:49+00:00 2026-06-05T06:33:49+00:00

EDIT~ Solution found and in my response below (last response for now) but I

  • 0

EDIT~ Solution found and in my response below (last response for now) but I can’t mark it as the answer for question until two days from now. In the meantime, I’ll leave this edit here until I can mark it correct.

Where the dialog is called:

public OnClickListener fieldListener = new OnClickListener() {
    public void onClick(View v) {
        FragmentManager fm = getSupportFragmentManager();
        switch (v.getId()) {
        case (0) :

        ChooseDialog ageDialog = new ChooseDialog("Age", ageEditText, act);
        ageDialog.show(fm, "fragment_edit_name");

The Dialog:

public class ChooseDialog extends DialogFragment implements DialogInterface.OnClickListener, OnMultiChoiceClickListener {

public Dialog onCreateDialog(Bundle savedInstanceState) {
        LayoutInflater inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View dialogLayout = inflater.inflate(R.layout.dialog, null);

        AlertDialog.Builder builder;
        switch (editText.getId()) {
        case (0) :
            ListView list = (ListView) dialogLayout.findViewById(R.id.listView1);
        list.setAdapter(new ArrayAdapter<String>(activity, R.layout.dialoglist, 
                activity.getResources().getStringArray(R.array.ageArray)));
        list.setBackgroundColor(00000000);
        builder = new AlertDialog.Builder(activity);
        builder.setTitle(type);
        builder.setNegativeButton("Cancel", this);
        builder.setView(dialogLayout);
        /* builder.setAdapter(new ArrayAdapter<String>(activity, R.layout.dialoglist, 
                    activity.getResources().getStringArray(R.array.ageArray)), 
                    new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    editText.setText(activity.getResources().getStringArray(R.array.ageArray)[which]);
                }} 
                );*/
        return builder.create();

Dialog.xml:

<?xml version="1.0" encoding="UTF-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/listView1"
    android:background="#00000000"
    android:cacheColorHint="#00000000"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >
</ListView>

DialogList.xml (just the textview for the adapter):

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_vertical"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:paddingLeft="6dip"
    android:textColor="@color/androidBlue"
    android:paddingRight="10dip"
    android:layout_weight="1"
    android:textAppearance="?android:attr/textAppearanceLarge" />

enter image description here

  • 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-05T06:33:51+00:00Added an answer on June 5, 2026 at 6:33 am

    My solution: change the AlertDialog.Builder constructor to use the one that takes Context, Theme:

    builder = (Integer.parseInt(android.os.Build.VERSION.SDK) < 11)? new AlertDialog.Builder(activity) : 
            new AlertDialog.Builder(activity, android.R.style.Theme_Translucent);
    

    This makes sure it loads transparent on Ginger (via the lines in XML for transparent); and Translucent on ICS. The main problem is that the dialog positive and negative buttons do not match my UI. I’ll be developing a solution there in the coming days.

    Another issue is using builder.setMultiChoiceItems(), null, this); instead of a list. This makes it have an all white background on the entire dialog area. I’m hoping to uncover a theme method here as well, but other than this, all of my dialogs look the way I want now 😛

    Solution found here: https://stackoverflow.com/a/8687164/1231943

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: The solution to the question can be found in the first comment by
[edit] Found the solution. Reinstall EVERYTHING - xcode, mono, monodevelop and monotouch. Now it
Solution Edit: Turns out you can't use the PHP SDK to return the correct
Intro: EDIT: See solution at the bottom of this question (c++) I have a
Edit: I think I figured out the solution, but I'm still interested to know
-Edit: Solution Found- Figured it out after some heavy searching - one person (I
EDIT: The solution was to add this to the profile page instead of the
EDIT : proper solution: void add(Student s) { if(root == null) root = new
I use the plugin waypoints ( http://imakewebthings.com/jquery-waypoints/ ) * EDIT : working solution :
(Edit: put possible solution at end) I'm a C/C++ programmer who is learning Objective

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.