fix: fix tabLabelStyle not applying on android#251
fix: fix tabLabelStyle not applying on android#251owinter86 wants to merge 1 commit intocallstack:mainfrom
Conversation
|
I also notice that the current react font manager instance only allows for font weight changes from bold or normal, other weights will default back to normal. however I also see that its possible to utilise the range of fontWeights within the ReactFontManager class public Typeface getTypeface(String fontFamilyName, int weight, boolean italic, AssetManager assetManager) {
return this.getTypeface(fontFamilyName, new TypefaceStyle(weight, italic), assetManager);
}I tested this locally and was able to have various font weights ranging from 100 to 900 (depending on the font support) val typeface = ReactFontManager.getInstance().getTypeface(
fontFamily ?: "",
fontWeight ?: 400,
false,
context.assets
)not sure if there were any reason behind the restricted font weight selections, and think its probably outside the scope of this quick fix. But maybe worth adding to this, or a different PR. |
|
|
||
| private fun updateTextAppearance() { | ||
| if (fontSize != null || fontFamily != null || fontWeight != null) { | ||
| val menuView = getChildAt(0) as? ViewGroup ?: return |
There was a problem hiding this comment.
Thanks for creating this PR, looks like this change is already included in #250
There was a problem hiding this comment.
Ah I see, looks like it snuck in on my previous PR and not isolated here.
You are welcome to create a PR for this support, It seemed off to me when I implemented this and forgot to get back to this later 😅 |
|
@okwasniewski ok I will update this to include the additional font weight supports. |
PR Description
tabLabelStyle is not applied on android currently in the latest release, this fixes this issue so that custom font and font size changes will correctly apply.
How to test?
Change fontSize in the tabLabelStyle within the NativeBottomTabs route, pre this commit it did not do anything.