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

Activity#getTitle method returns untranslated activity title #24

Open
antercepter opened this issue Nov 15, 2019 · 0 comments
Open

Activity#getTitle method returns untranslated activity title #24

antercepter opened this issue Nov 15, 2019 · 0 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@antercepter
Copy link
Contributor

antercepter commented Nov 15, 2019

Describe the bug
Activity#getTitle method returns untranslated label we set in android:label attribute in the AndroidManifest.xml and we cannot intercept it. The workaround is to read label of the activity directly from the AndroidManifest.xml and after that request string by this id from repository:

ActivityInfo activityInfo = getPackageManager().getActivityInfo(
                        getComponentName(),
                        PackageManager.GET_META_DATA
                );
 String label = getString(activityInfo.labelRes);

Expected behavior
Activity#getTitle method should return translated label

Library version
2.0.1

@antercepter antercepter added the bug Something isn't working label Nov 15, 2019
@antercepter antercepter changed the title Activity#getTitle method return untranslated activity title Activity#getTitle method returns untranslated activity title Nov 15, 2019
@JcMinarro JcMinarro added the help wanted Extra attention is needed label Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants