Created
December 19, 2013 08:11
-
-
Save twaddington/8035951 to your computer and use it in GitHub Desktop.
Fetch the Activity title from the Android manifest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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