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,555
  • 31
  • 31
  • 45
Korniltsev Anatoly
  • 3,676
  • 2
  • 26
  • 37

1 Answers1

1

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

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Oleg Osipenko
  • 2,409
  • 1
  • 20
  • 28