Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: customize application's menu (e.g background color)

What is the way (if there is a way) to customize the menu (the one triggered by the MENU button of the phone). I'm especially interested in two things:

  • changing the background color from the standard light gray into a darker gray
  • how the menu items are aligned. I have 4 items and they are automatically aligned 2x2, but I would prefer to have them all in one line (1x4)
like image 635
znq Avatar asked Oct 20 '09 09:10

znq


People also ask

How do I change the background color of my menu?

To change your menu's background color, click My Sites > Personalize > Customize. Once the Customizer screen loads, click CSS. Right-click on your navigation menu and choose Inspect. An Inspector panel will appear at the bottom of your screen, where you can view your website's underlying code.

How do I change the color of my header on Android?

First you have to change in manifest where you have declared the activity . Change app theme style to noActionBar. Now come to your main activity and initialize the new toolbar and set the color in it.

What is the default background color in Android?

By default each activity in Android has a white background. To change the background color, first add a new color definition to the colors.


1 Answers

I created my own menu class. It maybe isn't exactly what you want but it should hopefully get you started. Here is the article I published and a downloadable link to the source code.

http://www.codeproject.com/KB/android/AndroidMenusMyWay.aspx

like image 149
authorwjf Avatar answered Sep 28 '22 07:09

authorwjf