Das ist mein Haupt Layout ist:Scrolling Toolbar funktioniert nicht auf Kitkat
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) - Software developed by iClaude.
-->
<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"
android:fitsSystemWindows="true">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:elevation="4dp">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_scrollFlags="scroll|enterAlways" />
<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/MioStileTabLayout"
app:tabMode="scrollable" />
</android.support.design.widget.AppBarLayout>
<!-- The main content view -->
<RelativeLayout
android:id="@+id/main_rlUpdatingDatabase"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" >
<ProgressBar
android:id="@+id/main_pbUpdatingDatabase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="false"
android:layout_centerInParent="true"
android:layout_centerVertical="false"
android:visibility="visible" />
<TextView
android:id="@+id/main_tvUpdatingDatabase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="false"
android:layout_below="@id/main_pbUpdatingDatabase"
android:layout_centerHorizontal="false"
android:layout_centerInParent="true"
android:layout_centerVertical="false"
android:text="@string/intro_updatingDatabase"
android:textAppearance="?android:attr/textAppearanceMedium"
android:visibility="visible"
android:textColor="@color/text_secondary" />
</RelativeLayout>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_marginTop="8dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
app:fabSize="normal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_content_new"
android:layout_gravity="bottom|end"
app:elevation="6dp"
app:pressedTranslationZ="6dp"
android:layout_marginRight="@dimen/fab_margin_right"
android:layout_marginEnd="@dimen/fab_margin_right"
android:layout_marginBottom="@dimen/fab_margin_bottom"
android:onClick="animateFab"
app:layout_behavior="com.flingsoftware.personalbudget.app.utility.RidimensionaFABBehavior"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabFav"
app:fabSize="normal"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_important"
android:layout_gravity="bottom|end"
app:elevation="6dp"
app:pressedTranslationZ="6dp"
app:backgroundTint="@color/primary"
android:layout_marginRight="@dimen/fab_margin_right"
android:layout_marginEnd="@dimen/fab_margin_right"
android:layout_marginBottom="@dimen/fab_margin_bottom"
android:onClick="launchFav"
android:alpha="0" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabMic"
app:fabSize="normal"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_action_mic"
android:layout_gravity="bottom|end"
app:elevation="6dp"
app:pressedTranslationZ="6dp"
app:backgroundTint="@color/primary"
android:layout_marginRight="@dimen/fab_margin_right"
android:layout_marginEnd="@dimen/fab_margin_right"
android:layout_marginBottom="@dimen/fab_margin_bottom"
android:onClick="launchVocRec"
android:alpha="0" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabAgg"
app:fabSize="normal"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_content_new"
android:layout_gravity="bottom|end"
app:elevation="6dp"
app:pressedTranslationZ="6dp"
app:backgroundTint="@color/primary"
android:layout_marginRight="@dimen/fab_margin_right"
android:layout_marginEnd="@dimen/fab_margin_right"
android:layout_marginBottom="@dimen/fab_margin_bottom"
android:onClick="aggiungi"
android:alpha="0" />
</android.support.design.widget.CoordinatorLayout>
<!-- The navigation drawer -->
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/navigation_drawer_header_include"
layout="@layout/header" />
<ListView
android:id="@+id/left_drawer"
android:layout_below="@id/navigation_drawer_header_include"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="@color/nav_drawer_sfondo" />
</RelativeLayout>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
Mit dem ViewPager ich ein Fragment laden ein ExpandableListview (Erweiterung Listview) enthält. Auf API 19 Kitkat scrollt die Symbolleiste nicht in und aus dem Display, wenn ich durch die Liste blättern. Auf API 21 funktioniert alles gut. Wie löst man dieses Problem?
Vielen Dank.
könnte man ein rückwärtskompatibles XML aufblasen, das sich ähnlich verhält. –
@syslogic - was man tun könnte und was heute tatsächlich passiert, sind leider andere Dinge. – ianhanniballake
es gibt immer einen Kompromiss zwischen dem vollständigen Löschen der Unterstützung und dem Verschwenden von zu viel Zeit auf alten Geräten) ... während API 19-22 immer noch ungefähr 45% der Geräte sind. –