I have a custom view inside an activity, which i am launching with an Application context.
When i call the View.getContext()
from within my CustomView
and try to cast it:
Activity activity = (Acitivity)View.getContext();
It gives an error that cannot cast the Context
from Application
to Activity
.
Has someone faced this problem before ??? please help