5

当我的应用程序首次启动时,我正在使用ShowcaseView android 库添加一个欢迎屏幕。

现在,在 4.0+(可能是 3.0,但我没有设备来测试它)上它可以完美运行,但是在 Gingerbread 上,应用程序崩溃并出现以下错误。

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 的原因。

任何帮助表示赞赏!

4

3 回答 3

6

简短的回答是“还没有”。在我打字的时候实际工作!在此处查看Github 问题以获取更多信息。

于 2013-09-10T18:44:05.440 回答
1

已在此拉取请求 中修复
随意分叉它

于 2013-10-07T23:17:31.590 回答
0

您可以使用这样的自定义视图:在操作栏中设置自定义字体

然后创建新的 ShowcaseView,如:

ShowcaseView.ConfigOptions co = new ShowcaseView.ConfigOptions();
co.hideOnClickOutside = true;
ShowcaseView sv = ShowcaseView.insertShowcaseView(v, this, 
    "TITLE", "subtitle", co);
于 2013-10-22T19:24:28.267 回答