How can i get the name of the class
String.class.getName() returns java.lang.String
I am only interested in getting last part ie only String
Any Api can do that?
How can i get the name of the class
String.class.getName() returns java.lang.String
I am only interested in getting last part ie only String
Any Api can do that?
Here is the Groovy way of accessing object properties:
this.class.simpleName # returns the simple name of the current class
Get simple name instead of path.
String onlyClassName = this.getLocalClassName();
call above method in onCreate