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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:23:16+00:00 2026-06-10T11:23:16+00:00

I am adding two buttons to a notification in my app that is set

  • 0

I am adding two buttons to a notification in my app that is set to target API Level 8. The problem is that the two buttons appears as two large grey buttons, totally out of place with the rest of the notifications. I’ve tested it both on Nexus 7 and Galaxy Nexus.

enter image description here

All examples I’ve seen have the nice looking black buttons like the incoming call notification:
http://www.androidng.com/wp-content/uploads/2012/07/android-jelly-bean-notifications.jpeg

I would guess this would be easy, but no such luck today. Does anyone know where I might have taken the wrong turn? Below is a snippet of my code which generates the notification with the latest support library.

NotificationManager nm = (NotificationManager) this
            .getSystemService(Context.NOTIFICATION_SERVICE);
android.support.v4.app.NotificationCompat.Builder builder = new android.support.v4.app.NotificationCompat.Builder(this);
    builder.setContentIntent(contentIntent)
                .setSmallIcon(R.drawable.ic_stat_radio)                
                .setContentTitle(message)
                .setTicker(message) 
                .setPriority(android.support.v4.app.NotificationCompat.PRIORITY_HIGH)
                .setWhen(System.currentTimeMillis())
                .setAutoCancel(false)                   
                .addAction(android.R.drawable.ic_btn_speak_now, "Play", contentIntent)
                .addAction(android.R.drawable.ic_dialog_map, "Stop", contentIntent)
                .setContentText(message);

    Notification n = builder.build();

    //nm.notify(0, n);
    startForeground(1, n);
  • 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-10T11:23:18+00:00Added an answer on June 10, 2026 at 11:23 am

    So this is happening because your targetSdk in your AndroidManifest.xml is < 11.

    I believe the change in compatibility that happens when you target 11 is that the default theme because Holo. Since yours (and my) target is less than 11, it’s resorting to some compatibility theme that it applies on these buttons even though it shouldn’t. I assume that even though your app / activity is set to Holo, it doesn’t actually apply to the notification since they are are in a different process.

    That’s just my guess. Using CommonsWare’s notification demo and just modify the targetSdk shows this behavior.

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

Sidebar

Related Questions

I am adding two matrices (or possibly many) in ActionScript 3.0. Now my problem
It seems that C# is faster at adding two arrays of UInt16[] than it
I'm trying to make NSTable view app with adding rows with two columns x
I'm adding a couple of buttons to an already-existing NavigationController. The two buttons are
i have a table view. And im adding two buttons to each cell: -
hi all i have page that has two buttons, one should allow the person
I've got the code below working with IBActions on two buttons that decrease/increase text
Its just that. I want to center two buttons. My toolbar looks like this
In an ordinary document list in SharePoint 2010 there are two buttons for adding
I'm adding two buttons to my UITableView section Headers. The button action method needs

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.