小编Ins*_*nso的帖子

布局预览渲染问题:不支持PorterDuff颜色过滤器

在Android Studio 1.4中创建导航抽屉活动后,IDE会自动生成一些xml文件.
现在有一个问题:

布局编辑器中的图形预览可能不准确: - 不支持PorterDuff颜色过滤器.

这是我的activity_navi.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <include
        layout="@layout/app_bar_navi"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/nav_header_navi"
        app:menu="@menu/activity_navi_drawer" />

</android.support.v4.widget.DrawerLayout>
Run Code Online (Sandbox Code Playgroud)

我试图从activity_navi.xml中删除这些行,预览工作正常:

<include layout="@layout/app_bar_navi" android:layout_width="match_parent"
    android:layout_height="match_parent" />

<android.support.design.widget.NavigationView android:id="@+id/nav_view"
    android:layout_width="wrap_content" android:layout_height="match_parent"
    android:layout_gravity="start" android:fitsSystemWindows="true"
    app:headerLayout="@layout/nav_header_navi" app:menu="@menu/activity_navi_drawer" />
Run Code Online (Sandbox Code Playgroud)

我刚刚发现如果在布局预览中将API级别更改为20或21,问题就会消失!在我选择API 19之前.

有谁知道如何解决这个问题?

java android

10
推荐指数
1
解决办法
5138
查看次数

pivothigh() 和 pivotlow() 函数如何在 Tradingview Pinescript 上工作?

我正在尝试将脚本重写为 Python,但我无法弄清楚 pivothigh() 和 pivotlow() 函数是如何工作的,而且我找不到源代码,我知道如何计算枢轴点,但是 leftbars 和rightbars 在这两个函数中意味着什么?请帮忙。

tradingview-api pine-script

3
推荐指数
4
解决办法
3480
查看次数

标签 统计

android ×1

java ×1

pine-script ×1

tradingview-api ×1