The title of this question basically says it all. I get the error: no resource identifier found for app:layout_scrollflags from CollapsingToolbarLayout. I use eclipse and imported the design library jar file. I'm able to use the design support layouts in my classes so that's correct
this is a piece of the code i use:
<LinearLayout 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:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@color/activityBg" tools:context=".MainActivity" > <android.support.design.widget.AppBarLayout android:layout_height="wrap_content" android:layout_width="match_parent"> <android.support.design.widget.CollapsingToolbarLayout android:layout_width="match_parent" android:layout_height="match_parent" app:layout_scrollFlags="scroll|exitUntilCollapsed"> <include layout="@layout/toolbar"/> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout>
examples: http://android-developers.blogspot.in/2015/05/android-design-support-library.html
only importing the design library jar file is not enough. You need to import resource of android-design-library project while the jar file only contains class files.
Do as I say:
You have to do this, because xmlns:app="http://schemas.android.com/apk/res-auto"
means your need local resources from your library project or the current project, in this case, it means you need resources from the library project of android-design-library.
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