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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:02:53+00:00 2026-05-18T20:02:53+00:00

I’ve defined some style resources that include TextAppearance with a defined TextColor. I then

  • 0

I’ve defined some style resources that include TextAppearance with a defined TextColor. I then apply the styles to some TextViews and Buttons. All the styles come through with the TextView, but not the Button. For some reason, the textColor attribute is not showing up. Is this a bug, or am I missing something in the case of the Button?

Here is the style definition:

<?xml version="1.0" encoding="UTF-8"?>
<resources>

    <style name="TestApp">      
    </style>

    <!-- Text Appearances -->
    <style name="TestApp.TextAppearance">
        <item name="android:typeface">sans</item>
        <item name="android:textStyle">bold</item>
        <item name="android:textSize">16px</item>       
        <item name="android:textColor">#6666FF</item>
    </style>

    <!-- Widget Styles -->
    <style name="TestApp.Widget">
        <item name="android:layout_margin">3sp</item>
    </style>

    <style name="TestApp.Widget.Label">
        <item name="android:textAppearance">@style/TestApp.TextAppearance</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
    </style>

    <style name="TestApp.Widget.Switch">
        <item name="android:textAppearance">@style/TestApp.TextAppearance</item>
        <item name="android:layout_width">100px</item>
        <item name="android:layout_height">100px</item>
    </style>

</resources>

and here’s the layout where I attempt to apply them:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
<TextView
    style="@style/TestApp.Widget.Label"
    android:text="This is my label." />
<TextView
    style="@style/TestApp.Widget.Label"
    android:text="This is my disabled label."
    android:enabled="false" />
<Button
    style="@style/TestApp.Widget.Switch"
    android:text="This is my switch." />
<Button
    style="@style/TestApp.Widget.Switch"
    android:text="This is my disabled switch."
    android:enabled="false" />
</LinearLayout>
  • 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-05-18T20:02:54+00:00Added an answer on May 18, 2026 at 8:02 pm

    Apparently the way to achieve this is to override the textColor attribute in the button styling. Android does it this way in their Global Theme Styles:
    https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/styles.xml

    I’d love to understand why this is the case.

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

Sidebar

Related Questions

In order to apply a triggered animation to all ToolTip s in my app,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.