mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #565 from NativeScript/atanasovg/fix-actionbar-defaultlabel
Fix the way the default application label is retrieved. Check for inv…
This commit is contained in:
@ -182,8 +182,12 @@ export class ActionBar extends common.ActionBar {
|
||||
if (types.isDefined(title)) {
|
||||
actionBar.setTitle(title);
|
||||
} else {
|
||||
var defaultLabel = application.android.nativeApp.getApplicationInfo().labelRes;
|
||||
actionBar.setTitle(defaultLabel);
|
||||
var appContext = application.android.context;
|
||||
var appInfo = appContext.getApplicationInfo();
|
||||
var appLabel = appContext.getPackageManager().getApplicationLabel(appInfo);
|
||||
if (appLabel) {
|
||||
actionBar.setTitle(appLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user