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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:51:12+00:00 2026-06-17T08:51:12+00:00

I wanted a clickable TextView that changes color and holds it, that changes previously

  • 0

I wanted a clickable TextView that changes color and holds it, that changes previously changed text back to default color. And of course I wanted some state to be changed when each TextView was “checked.” Basically a TextView that acts like a RadioButton, or a RadioButton minus the button.

At first I tried to come at from the TextView angle. But it seems like using RadioButtons and adding text behavior is easier since RadioButtons extend TextView anyway.

So I have this color resource applied to each RadioButton:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:state_pressed="false" android:color="#0000ff" />
<item android:state_focused="true" android:state_pressed="true" android:color="#0000ff" />
<item android:state_focused="false" android:state_pressed="true" android:color="#0000ff" />
<item android:state_checked="true" android:color="#0000ff" />
<item android:color="#ff00ff00" />
</selector>

That gets me the text behavior I want. Now I just need a way to hide the RadioButton itself. Ideally this would be in XML so I can just apply a style to various RadioButton, but I’m not going to turn my nose up at a RadioButton extension.

So, anybody know how to hide the RadioButton button itself?

  • 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-17T08:51:12+00:00Added an answer on June 17, 2026 at 8:51 am

    You should use CheckedTextView. It supports checked state.

    OR

    You can use RadioButton and set its button to null:

    <RadioButton
        android:id="@+id/button"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textColor="@color/selector"
        android:button="@null"
        android:paddingLeft="0dip"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to create some clickable PowerShell scripts, and I found this answer that
Wanted some ideas about building a tool which can scan text sentences (written in
I previously had a JLabel, that I wanted to be click-able. The easiest way
I wanted to know that if I am doing correctly, regarding retain and release
Let's say I wanted to showcase 2-3 clickable buttons on my homepage which will
i'm trying to realize non-editable QTableView with widgets in cells that should contain clickable
Wanted some help with a problem with mapkit I am facing. Should be a
I have a listView, one component of the row is a TextView. By default,
I wanted to create a layout like the CyanogenMod call log in that there
I am facing this problem that buttons in android are not clickable when given

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.