Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 Square 的 Mortar 和 Flow
问题是:ActionBarDrawerToggle从 support-v7 需要有对 Activity 的引用
ActionBarDrawerToggle
但是view.getContext()返回PathContext所以我得到
view.getContext()
PathContext
ClassCastException: flow.path.PathContext cannot be cast to android.app.Activity
那么如何获得对活动的引用?
您是否尝试使用超类的类getBaseContext()方法?ContextWrapperPathContext
getBaseContext()
ContextWrapper