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

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

Closed
AdamGorkoz opened this issue Dec 6, 2015 · 38 comments
Closed
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@AdamGorkoz
Copy link

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.

@facebook-github-bot
Copy link
Contributor

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!

@ghost
Copy link

ghost commented Dec 22, 2015

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.

@satya164
Copy link
Contributor

Can confirm this.

@satya164 satya164 changed the title [Android] [Text] placeholder styling [Android] [TextInput] Placeholder font doesn't match TextInput styling Dec 22, 2015
@ramneekhanda
Copy link

+1

@sabashChinTam
Copy link

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

@eric1iu
Copy link

eric1iu commented Mar 4, 2016

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

@brunobar79
Copy link
Contributor

I think this can be closed since it was fixed here: #6564 and will be released on 0.26

@charpeni
Copy link
Contributor

@facebook-github-bot close

@ghost
Copy link

ghost commented May 20, 2016

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

@ghost ghost closed this as completed May 20, 2016
@ghost ghost added the Ran Commands One of our bots successfully processed a command. label May 20, 2016
@drpiou
Copy link

drpiou commented May 24, 2016

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).

@satya164
Copy link
Contributor

satya164 commented May 24, 2016

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 satya164 reopened this May 24, 2016
@peterhn
Copy link

peterhn commented May 24, 2016

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

@SudoPlz
Copy link
Contributor

SudoPlz commented Jun 21, 2016

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

@luisfuertes
Copy link

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

@julien-rodrigues
Copy link

I use the 0.29 and I have the issue too

@aakashsigdel
Copy link

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

@Arwiz
Copy link

Arwiz commented Jul 22, 2016

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

@aakashsigdel
Copy link

@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

@magrinj
Copy link
Contributor

magrinj commented Jul 22, 2016

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

@CapitanRedBeard
Copy link

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

@you-fail-me
Copy link

I can also confirm this issue. React native v0.31, unable to change placeholder fontFamily on android

@MrCeleryman
Copy link

Yea same here on v0.31 for Placeholder and entered text in TextInput but is fine on Buttons

@nyablo
Copy link

nyablo commented Oct 4, 2016

The same, if I'm trying to use custom font.

@alisonkohl
Copy link

alisonkohl commented Dec 21, 2016

+1, still experiencing this as well on v0.35

@ag7
Copy link

ag7 commented Dec 27, 2016

+1

@goncalomarques
Copy link

+1

@bennygenel
Copy link

+1 v0.39

@fabien-h
Copy link

still there on 0.40

@satya164
Copy link
Contributor

Please don't reply with +1 or saying that you still have the issue. This issue is still open because it's a known issue and hasn't been fixed yet. Commenting only spams everyone without doing anything to fix it.

Feel free to send a PR if you are willing to fix this.

@SandroMachado
Copy link
Contributor

Refs: #12000

@JosephMoralesGE
Copy link

Can we have an eta on a fix for this issue?

@ide
Copy link
Contributor

ide commented Jan 23, 2017

@janicduplessis has a PR out. I expect this to go out with RN 0.42 (Feb 1 RC, Mar 1 final release).

edmofro pushed a commit to edmofro/react-native that referenced this issue Feb 6, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 7, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
normanjoyner pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
nicktate pushed a commit to nicktate/react-native that referenced this issue Feb 9, 2017
…k#4600

Summary:
When using a TextInput with a custom font, the placeholder didn't use that font. This is because ReactTextInputManager didn't use ReactFontManager to create the TypeFace which handles custom fonts.

**Test plan**
Tested in UI explorer by reproducing the bug with and testing that the custom font gets applied properly after the fix.
``` js
<TextInput
  placeholder="Hello"
  style={{ fontFamily: 'notoserif' }}
/>
```
Closes facebook#12000

Reviewed By: hramos

Differential Revision: D4443713

fbshipit-source-id: e92c9822d9226681d7b00126dad95e5534c0c46e
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests