This is my TYPEFACE class
public class TYPEFACE {
public static final Typeface Rupee(Context ctx){
Typeface typeface = Typeface.createFromAsset(ctx.getAssets(), "Rupee_Foradian.ttf");
return typeface;
}
public static final Typeface ArialRounded(Context ctx){
Typeface typeface = Typeface.createFromAsset(ctx.getAssets(), "Rupee_Foradian.ttf");
return typeface;
}
}
And I try to access the methods from this class using Reflection by the following way
Method method;
TYPEFACE typeface;
try{
method = typeface.getClass().getMethod("Rupee",Context.class);
}catch(Exception e){
System.out.println("method : "+e);
}
But it throws the nullpointerexception.
05-21 17:12:07.026: I/System.out(14917): method : java.lang.NullPointerException
I dont know What is wrong with this way. Sombody can help me please.
Thanks in advance.