nativescript-checkbox icon indicating copy to clipboard operation
nativescript-checkbox copied to clipboard

Checkbox alignment problem on IOS

Open MateusSpadari opened this issue 5 years ago • 7 comments

The fill color is "floating" outside the checkbox boundaries ! On android it works normally. I don't know what to do to solve this layout problem. Thanks !!!

(I tested on IOS 12.2 and 13.1)

Captura de Tela 2020-02-20 às 16 09 10

MateusSpadari avatar Feb 20 '20 20:02 MateusSpadari

I have same problem

Captura de Pantalla 2020-02-26 a la(s) 9 38 14

nericode avatar Feb 26 '20 15:02 nericode

@NeriCodec You can replace the checkbox with the standard nativescript switch component

<Switch checked="true" (checkedChange)="onCheckedChange($event)"></Switch>

MateusSpadari avatar Feb 26 '20 16:02 MateusSpadari

@MateusSpadari this isn't a solution to the styling problem.... Anyone has a solution? this is still an issue...

mm-spiio avatar May 11 '20 21:05 mm-spiio

@mm-spiio yes, check this.

<StackLayout orientation="horizontal" height="20">
      <CheckBox
        android:class="m-l-10"
        checked="true"
        android:fillColor="#1473e6"
      >
      </CheckBox>
      <Label
        ios:marginLeft="-55"
        android:marginTop="5"
        android:marginLeft="-15"
        text="you text here"
      ></Label>
    </StackLayout>

nericode avatar May 12 '20 00:05 nericode

I half fixed mine using height=20 on iOS and adding a label inside a horizontal StackLayout to avoid the tap action, or add it if necessary, right now I'm trying to use this as a new directive so I do not have to do this all the time, on android I create a set of margins, looks like working

aosi87 avatar Jun 09 '20 15:06 aosi87

The fill color is "floating" outside the checkbox boundaries ! On android it works normally. I don't know what to do to solve this layout problem. Thanks !!!

(I tested on IOS 12.2 and 13.1)

Captura de Tela 2020-02-20 às 16 09 10

I'm having the same problem. Has anyone found a permanent solution for this?

gustavost26 avatar Mar 17 '23 15:03 gustavost26

https://github.com/nstudio/nativescript-plugins/tree/main/packages/nativescript-checkbox try this one out

I'm using this on iOS and it looks pretty good

<CheckBox
                  height="25"
                  verticalAlignment="center"
                  fillColor="#002160"
                  [id]="f.title + '-switch'"
                  [text]="f.title"
                  [checked]="f.isSelected"
                  (checkedChange)="onFilterCheckChange($event, f)"
                  padding="2"
                ></CheckBox>

bradmartin avatar Mar 22 '23 23:03 bradmartin