I know that using Context and the getClass().getName() method, I can get a string that represents the fully qualified name of the class, for example com.package1.package2.MainActivity .
How can I get only the last part, only the class name? In this case, it will be the MainActivity string.
I can do this with a simple split() method, but maybe there is a better way, more reliable.
android
sandalone May 15 '12 at 17:53 2012-05-15 17:53
source share