From 77a0325f660d3e4030da8cdb88db4b12b53f919d Mon Sep 17 00:00:00 2001 From: Dan Galpin Date: Mon, 25 May 2015 03:37:38 -0700 Subject: [PATCH] Added Design Library AppBar Scrolling --- README.md | 4 + app/build.gradle | 11 +-- .../main/res/layout-sw600dp/activity_main.xml | 1 - app/src/main/res/layout/activity_main.xml | 7 +- app/src/main/res/layout/fragment_main.xml | 80 +++++++++++++------ 5 files changed, 69 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index dd1731f..388b7f0 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,13 @@ Build Tools version 21.1.2 Android Support AppCompat 22.2.0 Android Support Annotations 22.2.0 Android Support GridLayout 22.2.0 +Android Support CardView 22.2.0 +Android Support Design 22.2.0 +Android Support RecyclerView 22.2.0 Google Play Services GCM 7.0.0 BumpTech Glide 3.5.2 + Getting Started --------------- This sample uses the Gradle build system. To build this project, use the diff --git a/app/build.gradle b/app/build.gradle index 735d5a7..dbf29c7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,10 +22,11 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.github.bumptech.glide:glide:3.5.2' - compile 'com.android.support:appcompat-v7:22.1.0' - compile 'com.android.support:support-annotations:22.1.0' - compile 'com.android.support:gridlayout-v7:22.1.0' - compile 'com.android.support:cardview-v7:22.1.1' - compile 'com.android.support:recyclerview-v7:22.1.1' + compile 'com.android.support:support-annotations:22.2.0' + compile 'com.android.support:gridlayout-v7:22.2.0' + compile 'com.android.support:cardview-v7:22.2.0' + compile 'com.android.support:appcompat-v7:22.2.0' + compile 'com.android.support:design:22.2.0' + compile 'com.android.support:recyclerview-v7:22.2.0' compile 'com.google.android.gms:play-services-gcm:7.0.0' } diff --git a/app/src/main/res/layout-sw600dp/activity_main.xml b/app/src/main/res/layout-sw600dp/activity_main.xml index bdf424e..5ac907f 100644 --- a/app/src/main/res/layout-sw600dp/activity_main.xml +++ b/app/src/main/res/layout-sw600dp/activity_main.xml @@ -35,7 +35,6 @@ android:layout_height="?attr/actionBarSize" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" - app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" /> + android:layout_height="wrap_content" + app:sharedElementTransitions="true"/> diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index 3240d81..77bb246 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -13,35 +13,69 @@ See the License for the specific language governing permissions and limitations under the License. --> - + + - - + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:elevation="0dp"> + - - - + app:layout_scrollFlags="scroll|enterAlways" + app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> + + + + + + + + + + + + + + +