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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:30:32+00:00 2026-06-09T22:30:32+00:00

On Android 4 this works fine but on 2.3.3 I’m getting (instead of a

  • 0

Alert dialog on 2.3.3

On Android 4 this works fine but on 2.3.3 I’m getting (instead of a total dark gray background) a light grey horizontal stripe behind the top of the OK button. Any ideas what might be causing this? Thanks!

private void showResult(final String message) {
   final Context context = this;

    Runnable run = new Runnable() {
        public void run() {
            AlertDialog.Builder builder = new AlertDialog.Builder(context);

            builder.setMessage(message)
                .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();
                    }
            });
            builder.create().show();
        }
    };

    this.runOnUiThread(run);
}

I have:

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="15" />

and in values/styles.xml

<resources>

<style name="AppTheme" parent="android:Theme.Light" />

</resources>
  • 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-09T22:30:34+00:00Added an answer on June 9, 2026 at 10:30 pm

    I am not sure whether you’re looking for a dark gray background on everything, or just for consistency.

    Have you tried changing the Theme of the AlertDialog.Builder? In API11+, there’s a second constructor you can use which takes an integer argument to set the theme. Perhaps setting it back to the "traditional" theme would get it to look the same across versions?

    public AlertDialog.Builder (Context context, int theme)

    Since: API Level 11

    Constructor using a context and theme for this builder and the AlertDialog it creates. The actual theme that an AlertDialog uses is a private implementation, however you can here supply either the name of an attribute in the theme from which to get the dialog’s style (such as alertDialogTheme or one of the constants AlertDialog.THEME_TRADITIONAL, AlertDialog.THEME_HOLO_DARK, or AlertDialog.THEME_HOLO_LIGHT.

    If that doesn’t work for you, you can use AlertDialog.Builder().setView(View) to be able to further specify the attributes of each of the items in the dialog (so you could potentially put Buttons in the View you pass, and set the background of the buttons to gray).

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

Sidebar

Related Questions

This sql command works fine in sqlitemanager but in my android application this don't
I had my camera set to this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); and it works fine but if I
Well this code works fine in java but when i started to run it
I am querying my db to fill my spinner selections (this works fine) but
When I execute the application on Android emulator it works fine but when I
In android phone this method works fine. It takes any double number and changes
I use functions for canvas like drawCircle and drawPoint in android. This works fine.
I've used this code https://github.com/johannilsson/android-pulltorefresh It all works perfectly apart from one thing, when
In my project whenever I extend activity it works fine but as soon as
I want to get a float from the preferences. This works fine when 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.