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 9 does not render text #41

Open
jerome2710 opened this issue Sep 5, 2019 · 3 comments
Open

Android 9 does not render text #41

jerome2710 opened this issue Sep 5, 2019 · 3 comments

Comments

@jerome2710
Copy link

While devices running Android 8 show text in my app properly, all my views are 'empty' when using a device with Android 9.

The Layout Inspector of Android Studio does show the contents under "Text" -> "mText", but not visually in the view. No errors were triggered.

build.gradle:

implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.3'

AndroidManifest.xml application:

android:name=".App"

App.java:

public class App extends Application {
    ...

    @Override
    public void onCreate() {
        ...

        ViewPump.init(ViewPump.builder()
            .addInterceptor(new CalligraphyInterceptor(
                new CalligraphyConfig.Builder()
                    .setDefaultFontPath("fonts/Rubik-Regular.ttf")
                    .setFontAttrId(R.attr.fontPath)
                    .build()))
            .build());

        ...
    }
}

Activity.java:

@Override
protected void attachBaseContext(Context newBase) {
    super.attachBaseContext(
        ViewPumpContextWrapper.wrap(
                LokaliseContextWrapper.wrap(newBase)
        )
    );
}

And then, all my views containing texts are empty on Android 9.

@PembaTamang
Copy link

yes same problem with me too... exactly the same

@jimmy510s
Copy link

Me too. Do we know the solution to this?

@chrisjenx
Copy link
Member

Are you using a mobile friendly font? Try changing to a different ttf and see if that works. (Each Version of android changes the skia lib, so it's possible 8->9 made something in those ttf incompatible :( )

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

4 participants