0

我正在尝试使用 Square 的 Mortar 和 Flow

问题是:ActionBarDrawerToggle从 support-v7 需要有对 Activity 的引用

但是view.getContext()返回PathContext所以我得到

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

那么如何获得对活动的引用?

4

1 回答 1

1

您是否尝试使用超类的类getBaseContext()方法?ContextWrapperPathContext

于 2015-04-27T16:26:37.183 回答