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

react native 开发小坑汇总 #3

Open
yylgit opened this issue Oct 29, 2016 · 0 comments
Open

react native 开发小坑汇总 #3

yylgit opened this issue Oct 29, 2016 · 0 comments

Comments

@yylgit
Copy link
Owner

yylgit commented Oct 29, 2016

1.android下设置TextInput的height很小以后,大概是小于40,里面的文本显示不全

出现原因:
问题是因为android下的TextInput上下有最小的padding,height很小以后,paddingBottom + fontSize > height 所以显示不全。
解决办法:
给TextInput的paddingBottom 设置的小一点。让font能够在height里面垂直居中。

2.android下View设置的zIndex属性有显示bug

使用场景:
写的Select组件,想让option显示在上层,所以用的zIndex属性,但是在android下时出现显示的问题。

解决办法:
首先将Select组件放在布局的最后面,然后使用position: absolute 绝对定位,定位到需要的位置,因为Select组件放在的是布局的最后面,所以他也会在最上层显示

@yylgit yylgit changed the title react native 开发小坑 react native 开发小坑汇总 Oct 29, 2016
@yylgit yylgit mentioned this issue Nov 1, 2016
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

1 participant