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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:41:43+00:00 2026-06-10T07:41:43+00:00

I have created one simple menu with two options that says Add new contact

  • 0

I have created one simple menu with two options that says “Add new contact” & “Settings” with white png images.

So now if i run in the 2.3.3 android OS version it looks like the below image:

Android 2.3.3 option menu

now if i run in the 2.2 android os then it looks like the below image:

enter image description here

So now what can i do if i want to make background black in android 2.2 so that i can get icons visible.
please give me any suggestion regarding this issue.

  • 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-10T07:41:45+00:00Added an answer on June 10, 2026 at 7:41 am

    The best way to deal with option menu is to customize it.

    You can customize the option menu, including:

    Add a custom font

    Change font size

    Change font color

    Set background to a Drawable resource (e.g. image, border, gradient)

    To change background to a border or gradient you have to create a resource folder in res called drawable and, inside it, create the border XML or gradient XML.

    This can all be done programatically as shown below:

     public class CustomMenu extends Activity {   
    /** Called when the activity is first created. */   
    @Override  
    public void onCreate(Bundle savedInstanceState) {   
        super.onCreate(savedInstanceState);     } 
    public boolean onCreateOptionsMenu(android.view.Menu menu) { 
        MenuInflater inflater = getMenuInflater();  
        inflater.inflate(R.menu.cool_menu, menu);  
        getLayoutInflater().setFactory(new Factory() {  
            public View onCreateView(String name, Context context, 
                    AttributeSet attrs) {   
            if (name.equalsIgnoreCase(                                             "com.android.internal.view.menu.IconMenuItemView")) { 
        try {  
            LayoutInflater li = LayoutInflater.from(context); 
            final View view = li.createView(name, null, attrs); 
            new Handler().post(new Runnable() { 
            public void run() {   
    // set the background drawable if you want that or keep it default 
    //either FOR image, border, gradient, drawable,etc.//   
            view.setBackgroundResource(R.drawable.myimage); 
            ((TextView) view).setTextSize(20);
            // set the text font and color  
            Typeface face = Typeface.createFromAsset(  
            getAssets(),"OldeEnglish.ttf");  
            ((TextView) view).setTypeface(face); 
            ((TextView) view).setTextColor(Color.RED);      }     }); 
            return view;      } 
            catch (InflateException e) {  
            //Handle any inflation exception here  
            } catch (ClassNotFoundException e) {    
            //Handle any ClassNotFoundException here    
                            }     }   
                return null;    }   }); 
               return super.onCreateOptionsMenu(menu);     } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created two actions in code, one simple and one advanced. function userbeep_action_info()
Using xlwDotNet, I have created a simple function which returns one number. Sometimes, something
I am a bit confused. I have created a simple form with a one
I'm trying to create a simple, custom, gallery. I have two lists, one with
I have created one service in my grails application. in that service 25 methods
i have created one image but problem is that when i save image from
I have to create a simple, one-level menu in an ASP.NET website clicking on
I have a php page that creates page data from two .txt files (one
I have created an HTML page which uses simple CSS (no javascript) for menu
I have a simple program with one TextView and two Buttons: Button1 and Button2.

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.