How do I pass reference to Activity for ActionBarDrawerToggle?

218 Views Asked by At

I am trying to use Square's Mortar and Flow

The problem is: ActionBarDrawerToggle from support-v7 requires to have a reference to the Activity

However view.getContext() returns PathContext so i get

ClassCastException: flow.path.PathContext cannot be cast to android.app.Activity

So how do I get reference to activity?

1

There are 1 best solutions below

5
Oleg Osipenko On

Try to use getBaseContext() method of ContextWrapper class that is superclass of PathContext.