Android 将ShowcaseView与v7 appcompat操作栏一起使用
当我的应用程序首次启动时,我正在使用android库添加欢迎屏幕 现在,在4.0+(可能还有3.0,但我还没有一个设备来测试它)上,它工作得很好,但是在姜饼上,应用程序崩溃了,出现以下错误Android 将ShowcaseView与v7 appcompat操作栏一起使用,android,android-layout,android-actionbar,android-support-library,showcaseview,Android,Android Layout,Android Actionbar,Android Support Library,Showcaseview,当我的应用程序首次启动时,我正在使用android库添加欢迎屏幕 现在,在4.0+(可能还有3.0,但我还没有一个设备来测试它)上,它工作得很好,但是在姜饼上,应用程序崩溃了,出现以下错误 09-10 15:30:31.182 1650-1650/net.rymate.notes E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: insertShowcaseViewWithType cannot
09-10 15:30:31.182 1650-1650/net.rymate.notes E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: insertShowcaseViewWithType cannot be used when the theme has no ActionBar
at com.github.espiandev.showcaseview.ShowcaseView$2.run(ShowcaseView.java:231)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
有没有什么办法可以让姜饼起作用?我希望我的应用程序能够在几乎所有的设备上运行,这就是为什么我要使用大量支持API的原因
感谢您的帮助 简短的回答是“还没有”。当我打字的时候,实际上正在做它!有关更多信息,请查看此处。已在中修复
您可以随意使用它您可以使用如下自定义视图: 然后创建新的ShowcaseView,如:
ShowcaseView.ConfigOptions co = new ShowcaseView.ConfigOptions();
co.hideOnClickOutside = true;
ShowcaseView sv = ShowcaseView.insertShowcaseView(v, this,
"TITLE", "subtitle", co);
谢谢,将继续进步!