react-native-checkbox icon indicating copy to clipboard operation
react-native-checkbox copied to clipboard

CheckBox in Android seems not aligned

Open redwolfgang24 opened this issue 1 year ago • 3 comments

CheckBox in Android seems not aligned if you adjust the width and height to 15

<CheckBox hideBox={true} style={styles.checkBoxStyle} value={this.state.checked} onValueChange={value => this.setChecked(value)} tintColors={{ true: '#24B2B2', false: 'transparent' }} boxType="square" onCheckColor="#24B2B2" tintColor="transparent" onTintColor="#24B2B2" />

Android when checkbox is uncheck Screenshot 2024-04-18 at 10 32 08 PM

Android when checkbox is check Screenshot 2024-04-18 at 10 29 49 PM

iOS works fine though

anyone can help me about this please.

Thank you!

redwolfgang24 avatar Apr 18 '24 14:04 redwolfgang24

Yes, Having the same exact issue here.

Anyone have a solution?

DanielOnramp avatar May 05 '24 17:05 DanielOnramp

Sometimes setting width and height directly can cause misalignment. Instead, use scaleX and scaleY to resize the checkbox: <CheckBox hideBox={true} style={{ transform: [{ scaleX: 0.7 }, { scaleY: 0.7 }] }} value={this.state.checked} onValueChange={value => this.setChecked(value)} tintColors={{ true: '#24B2B2', false: 'transparent' }} boxType="square" onCheckColor="#24B2B2" tintColor="transparent" onTintColor="#24B2B2" />

neeleshyadav253 avatar Aug 27 '24 08:08 neeleshyadav253

Anyone find the solution?

HamzaJameel01 avatar Nov 06 '24 12:11 HamzaJameel01