-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add left margin to radio buttons and check boxes #1477
Comments
in progress. |
approach 1 : approach 2 : Padding in drawable
It does not add padding before radio button icon. |
@juanchazo any update? |
in progress. |
Can you please share radio button drawable icon which has left padding 18dp for both selected and unselected state, so that I can try these drawable icons. |
@shelaghm |
@santosh-pingle Does the 16px padding need to be on the icons? In the code can you specify the 16px padding around the icon? I think that's how it is typically done. |
|
@santosh-pingle ah, got it. I added new icons with padding included. Shared on chat. |
To add padding before the RadioButton icon, you can use a drawable with padding as the button for the RadioButton. Here's how you can do it: First, create a new drawable resource file padded_icon.xml in the res/drawable directory:
// This will do the task. But it will also change the icon. So Either use your own radio button icon selector, or create like below.
(3) use this selector resource as drawable in padded_icon.xml. (4) use padded_icon.xml as button in radiobutto. |
Describe the bug
The checkbox is very close to the left edge.
Component
Core library, SDC library, reference app, or SDC gallery app
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Would you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.
The text was updated successfully, but these errors were encountered: