0

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?

General Grievance
  • 4,259
  • 21
  • 28
  • 43
Korniltsev Anatoly
  • 3,635
  • 2
  • 25
  • 36

1 Answers1

1

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

General Grievance
  • 4,259
  • 21
  • 28
  • 43
Oleg Osipenko
  • 2,389
  • 1
  • 20
  • 28