android


RadioButton circle and dot color on selected


I'm trying to change the ugly pink color that radioButton has when on pressed. I've been looking for it but seems like no one has the proper answer on how to do it. Do you recommend me styles or do it programmatically?
This is my xml layout of the radioButtons:
<RadioGroup
android:layout_width="200dp"
android:layout_height="250dp"
android:id="#+id/radioGroup"
android:orientation="vertical"
android:layout_above="#+id/btSig"
android:layout_centerHorizontal="true">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New RadioButton"
android:id="#+id/primero"
android:layout_marginTop="10dp"
android:onClick="pulsado"
android:textSize="17dp"
/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New RadioButton"
android:id="#+id/segundo"
android:layout_marginTop="10dp"
android:onClick="pulsado"
android:textSize="17dp"
/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New RadioButton"
android:id="#+id/tercero"
android:layout_marginTop="10dp"
android:onClick="pulsado"
android:textSize="17dp"
/>
</RadioGroup>
Thank you for the help!
The simplest way to change the default RadioButton color app-wide is to change it in your res folder.
In your project, go to app>res>values>colors.xml. This XML file contains the colors for your app in HEX values.
You will most likely see three XML values under <resources>. Remember, the colorAccent value changes the RadioButton select color.
You can change it with like that android:buttonTint="#a14545"
Code Example
<RadioButton
android:id="#+id/rb_mini_layout_selection_word_types_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:checked="true"
android:text="all"
android:buttonTint="#a14545" />

Related Links

“Failure 21 (out of memory)” when performing some SQLite operations
Android Market In-App Billing IN_APP_NOTIFY Response
Android Log adds package name at the beginning of a log message
how to load a PNG image on sdcard to a Canvas to draw in Android?
Choosing selected section from an SQLite database
Android: custom title style
Back button behavior with tabs and ActivityGroup
How to get OnUtteranceCompleted to be called?
android dev: item in listview can not get focus correctly
Android - Tempo adjust?
How to read Settings.Secure from the NDK
How to switch to an Activity that is running through an already running Activity
how to get image name using camera intent in android?
Nodpi images vs. Android 1.5
Is Android Widget ID persistent
Right to Left support for TextView in Android

Categories

HOME
windows
time-complexity
merge
nvd3.js
apache-jena
pagination
mysql-workbench
yahoo-finance
mstest
composite-primary-key
devise
ado.net
regular-language
settings
crystal-reports-2013
mvc5
openstreetmap
drop-down-menu
http-post
keytool
linear-algebra
event-sourcing
job-scheduling
forgot-password
shortest-path
enterprise-miner
babel
named-entity-recognition
itunes
soot
quantlib
dotspatial
erb
contacts
joomla2.5
navigator
salesforce-communities
reactivekit
railstutorial.org
postgresql-8.4
naming
double-click
ovf
magento-2.0.7
term
spring-integration-sftp
posixct
appdomain
janus
rackspace-cloud
cpu-cache
pybrain
mathcad
rmongo
vcloud-director-rest-api
slackware
microstation
adafruit
scaffolding
libav
concurrentmodification
django-urls
vacuum
rdflib
osc
linkedin-jsapi
unix-socket
grails-domain-class
lnk
jquery-slider
mutual-authentication
paste
vsx
syndicationfeed
bin
model-driven-development
beaker-testing
mvc-editor-templates
traceability
http-status-code-410
sentestingkit
vfs
cakephp-1.2
floating-point-exceptions
flex-mobile
mysql-error-1205
codebase
photolibrary
commerceserver2007
echo3
java1.4
cardspace
appliance

Resources

Encrypt Message