Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@twaddington
Created December 19, 2013 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twaddington/8035951 to your computer and use it in GitHub Desktop.
Save twaddington/8035951 to your computer and use it in GitHub Desktop.
Fetch the Activity title from the Android manifest
try {
ActivityInfo activityInfo = getPackageManager().getActivityInfo(getComponentName(), 0);
setTitle(activityInfo.labelRes);
} catch (NameNotFoundException e) {
SFLog.w(String.format("%s is not a valid Activity", getComponentName()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment