esbenp / react-native-clean-form

Easy react-native forms using bootstrap-like syntax with redux-form+immutablejs integration. Styled using styled-components
http://esbenp.github.io/2017/01/06/react-native-redux-form-immutable-styled-components/
MIT License
478 stars 76 forks source link

[Android] The text in Inputs is cut off #34

Closed markusguenther closed 7 years ago

markusguenther commented 7 years ago

When you use custom themes the text in input fields is maybe larger. Then it can happen that the text is cut off on the top.

The reason is the bar below the text on android. There is no way to disable the line. You can only hide the line but the padding is still there.

This only occurs when the input has a defined height. Otherwise, the framework arranges everything.

kruyvanna commented 7 years ago

device-2017-09-01-144744

I need large font size on the input. How can I achieve it?

celodauane commented 6 years ago

I had the same issue. The line on android in my case needed to be bigger than iOS, as such I fixed by simply increasing the line height. In your fonts file under or themes folder (if you have one), you can do something similar to this:

const display = { fontSize: Fonts.displaySize, lineHeight: Platform.OS === 'ios' ? Fonts.displayLineHeight : Fonts.displayLineHeight * 1.25, backgroundColor: Colors.transparent }

Hope it helps.