Update: this happens on Android 5.0 but it works just fine on 5.1. I filed this issue (https://code.google.com/p/android/issues/detail?id=175240) and it looks like it's gonna be included in the next release of the library
so I've been playing with the new Design Support Library and I've run into some issues. I think I've solved most of them, but I can't get this to work. Actually, not even the provided example is working properly on my phone.
The problem is that when the toolbar is expanded, the icons are way too high. And when collapsed, they are simply gone. See screenshots.
I'm trying this on a Moto X running 5.0. I know this happens in more devices, but it actually works on some of them. Is this happening to you? Any known workaround?
Fixed on
com.android.support:design:22.2.1
I found this phenomenon will be in the android 5.0 and above
This is my way to solve:delete "android:fitsSystemWindows="true"" in android.support.design.widget.CoordinatorLayout.
Like this :
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
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="@dimen/detail_backdrop_height"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With