react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[Android] [TextInput] Placeholder font doesn't match TextInput styling

Open AdamGorkoz opened this issue 10 years ago • 38 comments

Hi , Is it possible to set the font style of the placeholder of a text component on android ? as far as the docs go you can only change the text.

AdamGorkoz avatar Dec 06 '15 15:12 AdamGorkoz

Hey turka50, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If this is a feature request or a bug that you would like to be fixed by the team, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • We welcome clear issues and PRs that are ready for in-depth discussion; thank you for your contributions!

facebook-github-bot avatar Dec 06 '15 15:12 facebook-github-bot

I'm also having an issue with the placeholder text on Android. It does not apply the fontFamily which I have set in the styles. When I focus the TextInput the right fontFamily does get applied.

ghost avatar Dec 22 '15 12:12 ghost

Can confirm this.

satya164 avatar Dec 22 '15 23:12 satya164

+1

ramneekhanda avatar Feb 25 '16 18:02 ramneekhanda

Hi, I am also having this issue. Placeholder text fontFamily not applied, when I type to TextInput fontFamily applied. If i set secureTextEntry={true} placeholder text fontFamily applied

sabashChinTam avatar Feb 29 '16 05:02 sabashChinTam

the default fontFamily not the same when set secureTextEntry={true}. looks weird.

eric1iu avatar Mar 04 '16 23:03 eric1iu

I think this can be closed since it was fixed here: https://github.com/facebook/react-native/pull/6564 and will be released on 0.26

brunobar79 avatar May 17 '16 19:05 brunobar79

@facebook-github-bot close

charpeni avatar May 20 '16 13:05 charpeni

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

ghost avatar May 20 '16 14:05 ghost

I don't know why it was closed, placeholder font style doesn't match TextInput style on Android with ReactNative 0.26.1 (iOS works fine, fontFamily is applied for placeholder as expected).

drpiou avatar May 24 '16 11:05 drpiou

I can repro this successfully on 0.26.1. Placeholder still has the default font. The mentioned PR applies the style to the value text, but not the placeholder text.

satya164 avatar May 24 '16 14:05 satya164

I can confirm this as well. My placeholder text font doesn't match textinput font.

peterhn avatar May 24 '16 21:05 peterhn

I can confirm as well! Product pain opened here product-pains/TextInput-placeholder-style-customization for both iOS and Android.

SudoPlz avatar Jun 21 '16 07:06 SudoPlz

I have "react-native": "^0.25.1" and when i put secureTextEntry={true} fontsFamily break.. how can fix it?

luisfuertes avatar Jun 27 '16 09:06 luisfuertes

I use the 0.29 and I have the issue too

julien-rodrigues avatar Jul 13 '16 14:07 julien-rodrigues

Placeholder shown middle of the text input if a larger height is given on android. In ios it is on the top. Isn't there a way of defining where to place the placeholder? rn0.28.0

screen shot 2016-07-17 at 5 12 45 pm

aakashsigdel avatar Jul 17 '16 11:07 aakashsigdel

I am facing the same issue (aakashsigdel ) is there any workaround you get ?

Arwiz avatar Jul 22 '16 07:07 Arwiz

@Arwiz Well, it was in the documentation. I somehow missed it. Here is how to do it: textAlignVertical ReactPropTypes.oneOf( ['auto' /default/, 'top', 'bottom', 'center'] ) https://facebook.github.io/react-native/docs/text.html#style

aakashsigdel avatar Jul 22 '16 12:07 aakashsigdel

Same issue, my placeholder style doesn't match with the input style, I got this bug only on android phones.

magrinj avatar Jul 22 '16 12:07 magrinj

My TextInput text in general isn't applying the correct font family. Placeholder AND entered text. Only on Android and I'm on v0.31

CapitanRedBeard avatar Sep 20 '16 21:09 CapitanRedBeard