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

Input has extra vertical paddings on Android #609

Closed
1 of 2 tasks
artyorsh opened this issue Sep 10, 2019 · 14 comments · Fixed by #852
Closed
1 of 2 tasks

Input has extra vertical paddings on Android #609

artyorsh opened this issue Sep 10, 2019 · 14 comments · Fixed by #852
Labels
🐛 Bug 📱 Components components module-specific

Comments

@artyorsh
Copy link
Collaborator

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request

Issue description

Input component has extra text paddings on Android

Current behavior:

Screenshot on iOS
Screenshot on Android

Workaround:
Currently, to achieve same UI we can use

const styles = StyleSheet.create({
  text: Platform.select({
    ios: undefined,
    android: { paddingVertical: 0 },
  });
});

// ...

render() {
  return (
    <Input textStyle={styles.text} />
  );
}

Other information:

OS, device, package version

Nexus 5x API 26
@artyorsh
Copy link
Collaborator Author

Looks like it was RN issue, as it was fixed with updating dependencies to latest in our playground applications

@tuanna1601
Copy link

tuanna1601 commented Nov 4, 2019

@artyorsh Hi, could you tell me which dependencies you updated? I'm having this issue too using react-native@0.61.2 and react-native-ui-kitten@4.2.0

Thank you.

@artyorsh
Copy link
Collaborator Author

artyorsh commented Nov 4, 2019

@tuanna1601 can you please try running UI Kitten 4.3?

npm i react-native-ui-kitten@beta @eva-design/eva@beta

@tuanna1601
Copy link

@artyorsh I updated react-native-ui-kitten and @eva-design/eva but no good

@malashkevich malashkevich reopened this Nov 5, 2019
@LyunKi
Copy link

LyunKi commented Nov 8, 2019

I met the same problem.

@aganov
Copy link

aganov commented Dec 17, 2019

Same issue...

"react-native": "0.61.5",
"react-native-ui-kitten": "^4.3.1",
"@eva-design/eva": "^1.3.0",

@tuanna1601
Copy link

tuanna1601 commented Dec 18, 2019

We were able to solve this issue by adding this to custom mappings:

const mapping = {
  components: {
  ...
    Input: {
      appearances: {
        default: {
          variantGroups: {
            size: {
              small: {
                ...Platform.select({
                  android: {
                    paddingVertical: 0,
                  },
                  ios: {
                    paddingVertical: spacing(1.375),
                  },
                }),
              },
            },
          },
        }
      }
    }
  ...
  }
}

@artyorsh
Copy link
Collaborator Author

@tuanna1601 I just wonder why horizontal?

@tuanna1601
Copy link

@artyorsh I'm sorry, it's my bad, I copied the wrong one, I edited my answer above

@bmbknds
Copy link

bmbknds commented Dec 23, 2019

I got the same problem, can you fix it ?
I tried to use lower version of @eva/design like Kitten tricks App but the input still bigger on android.

@artyorsh
Copy link
Collaborator Author

@bmbknds we have no solution published in the actual version, you can use the workaround I described

@papigers
Copy link

Same issue here...

"@eva-design/eva": "^1.3.1",
"@ui-kitten/components": "4.3.2",
"@ui-kitten/eva-icons": "4.3.2",
"react": "^16.12.0",
"react-native": "^0.61.5",

@Frans-L
Copy link

Frans-L commented Jan 20, 2020

Hey, is there any update? Has anyone started do a fix / pr?

@artyorsh
Copy link
Collaborator Author

@Frans-L yes. This will be fixed in next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug 📱 Components components module-specific
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants