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

tabLabel doesn't show all the letters when using Android 9 #962

Closed
coolguy001tv opened this issue Dec 1, 2018 · 4 comments
Closed

tabLabel doesn't show all the letters when using Android 9 #962

coolguy001tv opened this issue Dec 1, 2018 · 4 comments

Comments

@coolguy001tv
Copy link

coolguy001tv commented Dec 1, 2018

Steps to Reproduce

See the demo here
Here's the source code:

import * as React from 'react';
import { Text, View, StyleSheet } from 'react-native';

// You can import from local files
import NavBar from 'react-native-scrollable-tab-view';

export default class App extends React.Component {
  render() {
    return (
      <View style={{flex: 1,marginTop:20}}>
                <NavBar>
                    <View
                        tabLabel="abcd"
                    />
                    <View
                        tabLabel="efgh"
                    />
                </NavBar>

            </View>
    );
  }
}

You can see the tabs are 'abcd' and 'efgh' in the example above.
But in my phone (ONE PLUS 6 with Android 9.0.1) , the tabs only show 'abc' and 'efg'

Expected Behavior

Show the right tab.
(I found it ok in android 7)

Here's my screenshot.

47bfeb3df7a99e33dbbf1b83c91229d

@coolguy001tv coolguy001tv changed the title tabLabel cannot show all the letters when using Android 9 tabLabel doesn't show all the letters when using Android 9 Dec 4, 2018
@ibrahemid
Copy link

i have OnePlus device running on the android pi as well, i believe its something related to the default style for the tabBarText , i was able to fix the letter limit by overriding the Text-Style , try changing the text size or the fontFamily .

this worked for me 😋

<ScrollableTabView
   //other ScrollableTabView styles 
   tabBarTextStyleStyle={{
   fontFamily:'anything'
   //strange , but worked
   //even if the font doesn't exist it will work
   //other ScrollableTabView styles 
                       }}
                  >

Screenshots
https://imgur.com/a/hjG7ETP

@coolguy001tv
Copy link
Author

@ibrahemid Thanks a lot. Setting the fontFamily to anything (even empty string) is ok for me. But it seems that setting fontSize doesn't work for me. However, it's a solution. Yet I don't know why, either.

@coolguy001tv
Copy link
Author

Actually, this is related to facebook/react-native#15114 (comment) or facebook/react-native#25481 (comment) . If someone needs more info, check there.

@ibrahemid
Copy link

👍

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

2 participants