我正在使用appcompat v7库处理我的应用程序的材料设计版本,我遇到了导航抽屉的问题.打开时,材料设计工具栏中的按钮将停止运行 - 导航抽屉外的任何触摸都会关闭抽屉.以下是我的意思的gif
gif http://images.rymate.co.uk/images/83JXi1X.png
这是我用于活动的xml布局:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/action_toolbar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:elevation="4dp"
/>
<FrameLayout
android:id="@+id/note_list_container"
android:layout_marginTop="?attr/actionBarSize"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<net.rymate.notes.ui.FloatingActionButton
android:id="@+id/fabbutton"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="16dp"
android:layout_marginRight="16dp" />
</FrameLayout>
<!-- The navigation drawer -->
<LinearLayout
android:id="@+id/left_drawer"
android:layout_width="300dp"
android:layout_marginTop="?attr/actionBarSize"
android:layout_height="match_parent"
android:layout_gravity="start"
android:orientation="vertical">
<ListView
android:id="@+id/cat_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="?catBackColour" />
</LinearLayout>
</android.support.v4.widget.DrawerLayout>
Run Code Online (Sandbox Code Playgroud)
这里是onCreate初始化抽屉和工具栏的代码.
@Override
protected void onCreate(Bundle savedInstanceState) { …Run Code Online (Sandbox Code Playgroud) 我正在使用ShowcaseView我的应用程序首次启动时,我安卓库添加欢迎屏幕.
现在,在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)
Run Code Online (Sandbox Code Playgroud)
有没有办法让这个工作在姜饼上?我希望我的应用能够在几乎所有设备上工作,这就是我使用大量支持API的原因.
任何帮助表示赞赏!
android android-layout android-actionbar android-support-library showcaseview
我正在尝试使用blur.js在我的网站上创建模糊效果,以便您可以看到内容背后的网站背景.但是,它似乎试图访问名为"无"的图像.
以下是chrome javascript日志的输出:
$('#container').blurjs({source: 'body',radius: 10});
[
<div id=?"container">?…
]
GET http://rymate.x10.mx/test/none 404 (Not Found) blur.min.js:285
(anonymous function) blur.min.js:285
jQuery.extend.each jquery-1.7.1.js:658
jQuery.fn.jQuery.each jquery-1.7.1.js:271
$.fn.blurjs blur.min.js:199
(anonymous function)
InjectedScript._evaluateOn
InjectedScript._evaluateAndWrap
InjectedScript.evaluate
Run Code Online (Sandbox Code Playgroud)
我的代码在https://gist.github.com/rymate1234/6162990以及http://rymate.x10.mx/test/上在线.
任何帮助将不胜感激.