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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:12:11+00:00 2026-06-13T19:12:11+00:00

Question: Where can I find default styles xml with hexadecimal codes of colors? I’m

  • 0

Question:
Where can I find default styles xml with hexadecimal codes of colors?

I’m looking for Style ‘buttonStyle’ and other default styles witch affect aspects like TextViews, Buttons etc (if you dont change the style of aspect)

I looked up in <instalation_folder>\android-sdk\platforms\android-<versio>\data\res\values and <instalation_folder>\android-sdk\platforms\android-<version>\data\res\colors but I didn’t actually find what I was looking for.

Hope my question is clear.


Due to low reputation I cant answer this question yet. Here is answer

Answer

With a bit of googling I found ‘buttonStyle’ is actually ‘Widget.Button’ –
Styling Android With Defaults

This is how it works:

  • As I said ‘buttonStyle’ style is accualy ‘Widget.Button’ style defined in \android-sdk\platforms\android-<version>\data\res\values\styles.xml. Background is set to: @android:drawable/btn_default
  • \android-sdk\platforms\android-<version>\data\res\drawable\btn_default.xml defines background color of button as selector. Color actually depends on button’s state. Default color is set to @drawable/btn_default_normal
  • With a bit of searching I found, that btn_default_normal is png image located in \android-sdk\platforms\android-<version>\data\res\drawable-mdpi

I find it a bit confusing, but I hope it will help someone, maybe…

  • 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-13T19:12:12+00:00Added an answer on June 13, 2026 at 7:12 pm

    Understanding how Android styles do work can be a little bit messy.

    I will try to explain how the basic work flow would be, based on an example.

    Let’s assume you want to know what the default background for buttons is.
    This can be either a simple color (unlikely) or a drawable (there are many different types of drawables).

    Android has Themes. A theme basically defines which style is applied to which widget.
    Therefore, our first step is to find the default android theme.

    You find it under android-sdk\platforms\android-15\data\res\values\themes.xml

    In this theme file, search for button.

    You will find something like this:

    <!-- Button styles -->
    
    <item name="buttonStyle">@android:style/Widget.Button</item>
    

    This means that the theme applies the style Widget.Button to buttons.

    Ok, now let’s find the style Widget.Button.

    All default Android style are defined in the file android-sdk\platforms\android-15\data\res\values\styles.xml

    Now search for Widget.Button

    You will find something like this:

    <style name="Widget.Button">
        <item name="android:background">@android:drawable/btn_default</item>
        <item name="android:focusable">true</item>
        <item name="android:clickable">true</item>
        <item name="android:textAppearance">?android:attr/textAppearanceSmallInverse</item>
        <item name="android:textColor">@android:color/primary_text_light</item>
        <item name="android:gravity">center_vertical|center_horizontal</item>
    </style>
    

    The interesting line is:

    <item name="android:background">@android:drawable/btn_default</item>

    This means that there is a drawable called btn_default set as button background.

    Now we need to find a file named btn_default.* in one of the drawable folders under android-sdk\platforms\android-15\data\res.

    This can be either an image (very unlikely) or a xml file like btn_default.xml.

    After a little bit searching you will find the file android-sdk\platforms\android-15\data\res\drawable\btn_default.xml

    It contains something like this:

    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/btn_default_normal" />
        <item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/btn_default_normal_disable" />
        <item android:state_pressed="true" android:drawable="@drawable/btn_default_pressed" />
        <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_default_selected" />
        <item android:state_enabled="true" android:drawable="@drawable/btn_default_normal" />
        <item android:state_focused="true" android:drawable="@drawable/btn_default_normal_disable_focused" />
        <item android:drawable="@drawable/btn_default_normal_disable" />
    </selector>
    

    Now you have to understand that this is a selector drawable (one of the many drawable types).
    This selector chooses different backgrounds, based on the buttons state. For example, if the buttons is pressed, it has a different background.

    No let’s look at the default state.

    <item android:state_enabled="true" android:drawable="@drawable/btn_default_normal" />

    It applies a drawable called btn_default_normal.

    Now we need to find this drawable.

    Again, we need to find a file named btn_default_normal.* in one of the drawable folders under android-sdk\platforms\android-15\data\res.

    This can be again either an image or a xml file like btn_default_normal.xml.

    You will find multiple files called ‘btn_default_normal.9.png’ in different drawable folders for different resolutions.

    🙂 Now you know that btn_default_normal.9.png is set as button background.

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

Sidebar

Related Questions

simple question: How I can find out commands for a DLLImport in C#.Net and
Just a small question I can't find an answer to. If I add a
This may sounds like a stupid question but can't find anything on google, probably
Sorry for question but I can't find answer anywhere on internet. I couldn't find
Simple question: I need a solution so that I can find, lets say names,
This is a pretty basic question but I can't find a good answer for
I'm asking and answering this question so that I can find it again in
I have not been able to find any definitive answers to this question: Can
I have a feeling this is a stupid question but I can't find the
I have what is probably a really simple, studid question but I can't find

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.