Skip to content
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

Checkbox alignment problem on IOS #123

Open
MateusSpadari opened this issue Feb 20, 2020 · 7 comments
Open

Checkbox alignment problem on IOS #123

MateusSpadari opened this issue Feb 20, 2020 · 7 comments

Comments

@MateusSpadari
Copy link

MateusSpadari commented Feb 20, 2020

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

@nericode
Copy link

I have same problem

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

@MateusSpadari
Copy link
Author

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

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

@mm-spiio
Copy link

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

@nericode
Copy link

@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>

@aosi87
Copy link

aosi87 commented Jun 9, 2020

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

@gustavost26
Copy link

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?

@bradmartin
Copy link
Collaborator

bradmartin commented Mar 22, 2023

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants