mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +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)) {
|
if (types.isDefined(title)) {
|
||||||
actionBar.setTitle(title);
|
actionBar.setTitle(title);
|
||||||
} else {
|
} else {
|
||||||
var defaultLabel = application.android.nativeApp.getApplicationInfo().labelRes;
|
var appContext = application.android.context;
|
||||||
actionBar.setTitle(defaultLabel);
|
var appInfo = appContext.getApplicationInfo();
|
||||||
|
var appLabel = appContext.getPackageManager().getApplicationLabel(appInfo);
|
||||||
|
if (appLabel) {
|
||||||
|
actionBar.setTitle(appLabel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user