Po utworzeniu czynności w szufladzie nawigacji w Android Studio 1.4, IDE automatycznie wygenerował kilka plików xml.
Teraz pojawia się problem:Podgląd układu Problemy z renderowaniem: Filtry kolorów PorterDuff nie są obsługiwane
Podgląd grafiki w edytorze układu mogą nie być dokładne: - PorterDuff Kolor Filtry nie są obsługiwane.
Oto moja 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>
Starałem się usunąć te linie z activity_navi.xml i podgląd działa dobrze:
<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" />
Właśnie znalazłem w przypadku zmiany poziomu API do 20 lub 21 w podglądzie układu, problem znika! I zanim wybrałem interfejs API 19.
Czy ktoś wie, jak rozwiązać ten problem?