0

I'm looking to use the NavigationView, part of the Android design support library, instead of a ListView.

I use SherlockFragmentActivity part of the ABS framework, my question is how can I use NavigationView with ABS (without usnig Appcompact) ?

4

2 回答 2

1

不,NavigationView需要 AppCompat 根据发布博客文章

请注意,由于设计库依赖于 Support v4 和 AppCompat 支持库

因为它使用 AppCompat 在所有 API 级别上实现一致的主题。

于 2015-07-20T19:55:11.147 回答
0

您可以使用 AppCompatDelegate 在您的 SherlockFragmentActivity 中启用 AppCompat。一个官方的例子是:https ://github.com/android/platform_development/blob/master/samples/Support7Demos/src/com/example/android/supportv7/app/AppCompatPreferenceActivity.java

于 2015-07-22T14:41:52.430 回答