Why Does Android:label's Text Not Changing When User Changes Language Within My App?
So within my app, the very first Activity that user sees is to choose language. Lets say if user chooses french and then goes to ActivityB, then to ActivityC. Now decides to chan
Solution 1:
In my case, app won't change Actionbar language after change locale. It will change when I remove app from the recent app which make the app completely close. To solve, I use setTitle(R.id.myapplabel)
when you want to refresh app or oncreate, so no need to restart app. Translate your activity label on string.xml and it should works.
Solution 2:
Few steps to solve the problem.
Move your app to ToolBar no more ActionBar
Remove label from AndroidManifest.xml file
<activity android:name=".package.Activity" android:label="" android:configChanges="locale" android:screenOrientation="portrait" android:theme="@style/NoActionBar" />
Recreate your app when change locale activity.recreate()
- All activity title should be in strings.xml file
Post a Comment for "Why Does Android:label's Text Not Changing When User Changes Language Within My App?"