From cf6c6a2c73c2c1bf2ba5bada8f41f4a13fbfc0a7 Mon Sep 17 00:00:00 2001 From: Manuel Peinado Date: Sat, 22 Jun 2013 08:26:04 +0200 Subject: [PATCH] Fixed severe issue (#6 on github) with prevented the library from working properly with ListViews; bumped version number to 2.2.0; updated changelog --- CHANGELOG.md | 5 +++++ library/AndroidManifest.xml | 4 ++-- library/pom.xml | 2 +- .../fadingactionbar/FadingActionBarHelper.java | 10 +++++++--- pom.xml | 2 +- sample/AndroidManifest.xml | 4 ++-- sample/pom.xml | 2 +- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c47f037..f6498af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Change Log ======================================= +Version 2.2.0 *(2013-06-22)* +---------------------------- +* Fixes severe issue (https://github.com/ManuelPeinado/FadingActionBar/issues/6) +* Adds support for HoloEverywhere (https://github.com/ManuelPeinado/FadingActionBar/issues/4). + Version 2.1.0 *(2013-06-01)* ---------------------------- * Added support for parallax scroll diff --git a/library/AndroidManifest.xml b/library/AndroidManifest.xml index 43f95e4..bd9a18b 100644 --- a/library/AndroidManifest.xml +++ b/library/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="7" + android:versionName="2.2.0" > com.github.manuelpeinado.fadingactionbar parent - 2.1.1-SNAPSHOT + 2.2.0-SNAPSHOT ../pom.xml diff --git a/library/src/com/manuelpeinado/fadingactionbar/FadingActionBarHelper.java b/library/src/com/manuelpeinado/fadingactionbar/FadingActionBarHelper.java index 02f1ea5..15daff0 100644 --- a/library/src/com/manuelpeinado/fadingactionbar/FadingActionBarHelper.java +++ b/library/src/com/manuelpeinado/fadingactionbar/FadingActionBarHelper.java @@ -58,6 +58,9 @@ public class FadingActionBarHelper { private ViewGroup mContentContainer; private ViewGroup mScrollView; private boolean mFirstGlobalLayoutPerformed; + private View mMarginView; + private View mListViewBackgroundView; + public FadingActionBarHelper actionBarBackground(int drawableResId) { mActionBarBackgroundResId = drawableResId; @@ -198,7 +201,6 @@ public void scheduleDrawable(Drawable who, Runnable what, long when) { public void unscheduleDrawable(Drawable who, Runnable what) { } }; - private View mMarginView; private View createScrollView() { mScrollView = (ViewGroup) mInflater.inflate(R.layout.fab__scrollview_container, null); @@ -221,7 +223,6 @@ public void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt) { onNewScroll(t); } }; - private View mListViewBackgroundView; private View createListView(ListView listView) { mContentContainer = (ViewGroup) mInflater.inflate(R.layout.fab__listview_container, null); @@ -235,10 +236,13 @@ private View createListView(ListView listView) { mMarginView.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT, 0)); listView.addHeaderView(mMarginView, null, false); + // Make the background as high as the screen so that it fills regardless of the amount of scroll. mListViewBackgroundView = mContentContainer.findViewById(R.id.fab__listview_background); + FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mListViewBackgroundView.getLayoutParams(); + params.height = Utils.getDisplayHeight(listView.getContext()); + mListViewBackgroundView.setLayoutParams(params); listView.setOnScrollListener(mOnScrollListener); - return mContentContainer; } diff --git a/pom.xml b/pom.xml index 32e923e..413102d 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ com.github.manuelpeinado.fadingactionbar parent pom - 2.1.1-SNAPSHOT + 2.2.0-SNAPSHOT Android-FadingActionBar (Parent) Android library implementing a fading effect for the action bar, similar to the one found in the Play Music app diff --git a/sample/AndroidManifest.xml b/sample/AndroidManifest.xml index c3fd1a6..ca86b5e 100644 --- a/sample/AndroidManifest.xml +++ b/sample/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="7" + android:versionName="2.2.0" > com.github.manuelpeinado.fadingactionbar parent - 2.1.0-SNAPSHOT + 2.2.0-SNAPSHOT ../pom.xml