From 541dba473a478772af760732e9fe4e7c609fc468 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 8 Jul 2015 16:36:19 +0200 Subject: [PATCH] upgraded version to 1.0.6 --- .idea/libraries/answers_1_2_2.xml | 10 +++++++++ .idea/libraries/beta_1_1_3.xml | 10 +++++++++ .idea/libraries/crashlytics_2_4_0.xml | 10 +++++++++ .idea/libraries/crashlytics_core_2_3_3.xml | 10 +++++++++ .idea/libraries/fabric_1_3_4.xml | 10 +++++++++ README.md | 3 +++ materialviewpager/build.gradle | 2 +- materialviewpager/materialviewpager.iml | 2 +- .../MaterialViewPagerAnimator.java | 6 +++-- sample/.gitignore | 3 ++- sample/build.gradle | 22 ++++++++++++++++++- sample/sample.iml | 10 +++++++++ sample/src/main/AndroidManifest.xml | 5 +++++ .../sample/MainActivity.java | 6 +++++ 14 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 .idea/libraries/answers_1_2_2.xml create mode 100644 .idea/libraries/beta_1_1_3.xml create mode 100644 .idea/libraries/crashlytics_2_4_0.xml create mode 100644 .idea/libraries/crashlytics_core_2_3_3.xml create mode 100644 .idea/libraries/fabric_1_3_4.xml diff --git a/.idea/libraries/answers_1_2_2.xml b/.idea/libraries/answers_1_2_2.xml new file mode 100644 index 00000000..e070364f --- /dev/null +++ b/.idea/libraries/answers_1_2_2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/beta_1_1_3.xml b/.idea/libraries/beta_1_1_3.xml new file mode 100644 index 00000000..236ae995 --- /dev/null +++ b/.idea/libraries/beta_1_1_3.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/crashlytics_2_4_0.xml b/.idea/libraries/crashlytics_2_4_0.xml new file mode 100644 index 00000000..02dd64aa --- /dev/null +++ b/.idea/libraries/crashlytics_2_4_0.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/crashlytics_core_2_3_3.xml b/.idea/libraries/crashlytics_core_2_3_3.xml new file mode 100644 index 00000000..b668786e --- /dev/null +++ b/.idea/libraries/crashlytics_core_2_3_3.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/fabric_1_3_4.xml b/.idea/libraries/fabric_1_3_4.xml new file mode 100644 index 00000000..ad1dfd9f --- /dev/null +++ b/.idea/libraries/fabric_1_3_4.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index f4f55346..d9535163 100644 --- a/README.md +++ b/README.md @@ -499,6 +499,9 @@ And must include @layout/material_view_pager_placeholder as first child #CHANGELOG +##1.0.6 +- fix bug on low resolutions + ##1.0.6 - added attribute transparentToolbar - added attribute animatedHeaderImage diff --git a/materialviewpager/build.gradle b/materialviewpager/build.gradle index 9564b743..76b6e152 100644 --- a/materialviewpager/build.gradle +++ b/materialviewpager/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' apply plugin: 'com.github.ben-manes.versions' -version = "1.0.6" +version = "1.0.7" android { compileSdkVersion 22 diff --git a/materialviewpager/materialviewpager.iml b/materialviewpager/materialviewpager.iml index 5b0aa274..d024ee7d 100644 --- a/materialviewpager/materialviewpager.iml +++ b/materialviewpager/materialviewpager.iml @@ -1,5 +1,5 @@ - + diff --git a/materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerAnimator.java b/materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerAnimator.java index 36f90033..d698c938 100644 --- a/materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerAnimator.java +++ b/materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerAnimator.java @@ -91,6 +91,9 @@ public class MaterialViewPagerAnimator { float firstScrollValue = Float.MIN_VALUE; boolean justToolbarAnimated = false; + //intial distance between pager & toolbat + float initialDistance = -1; + public MaterialViewPagerAnimator(MaterialViewPager materialViewPager) { this.settings = materialViewPager.settings; @@ -143,8 +146,6 @@ private void setScrollOffset(Object scroll, float yOffset) { } } - float initialDistance = -1; - /** * Called when a scroller(RecyclerView/ListView,ScrollView,WebView) scrolled by the user * @@ -184,6 +185,7 @@ public void onMaterialScrolled(Object source, float yOffset) { if(initialDistance == -1) initialDistance = mHeader.mPagerSlidingTabStrip.getTop() - mHeader.toolbar.getBottom(); + //distance between pager & toolbar float newDistance = ViewHelper.getY(mHeader.mPagerSlidingTabStrip) - mHeader.toolbar.getBottom(); percent = 1 - newDistance/initialDistance; diff --git a/sample/.gitignore b/sample/.gitignore index ce9b610d..09f39f0b 100644 --- a/sample/.gitignore +++ b/sample/.gitignore @@ -1,3 +1,4 @@ /build material_view_pager_keystore.jks -keyInfos.properties \ No newline at end of file +keyInfos.properties +fabric.properties \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index 99df5bc8..35189433 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,6 +1,22 @@ apply plugin: 'android-sdk-manager' apply plugin: 'com.android.application' +buildscript { + repositories { + maven { url 'https://maven.fabric.io/public' } + } + + dependencies { + classpath 'io.fabric.tools:gradle:1.+' + } +} + +apply plugin: 'io.fabric' + +repositories { + maven { url 'https://maven.fabric.io/public' } +} + android { compileSdkVersion 22 buildToolsVersion "22.0.1" @@ -8,7 +24,7 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 22 - versionCode 2 + versionCode 3 versionName "1.0" } @@ -53,5 +69,9 @@ dependencies { // transitive=true //} + compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') { + transitive = true; + } + compile project(':materialviewpager') } diff --git a/sample/sample.iml b/sample/sample.iml index cff01670..fe34cbec 100644 --- a/sample/sample.iml +++ b/sample/sample.iml @@ -62,6 +62,11 @@ + + + + + @@ -80,12 +85,17 @@ + + + + + \ No newline at end of file diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 755fd9e1..c33df6ff 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -20,6 +20,11 @@ + + + diff --git a/sample/src/main/java/com/github/florent37/materialviewpager/sample/MainActivity.java b/sample/src/main/java/com/github/florent37/materialviewpager/sample/MainActivity.java index b0f67133..9d58ccc3 100644 --- a/sample/src/main/java/com/github/florent37/materialviewpager/sample/MainActivity.java +++ b/sample/src/main/java/com/github/florent37/materialviewpager/sample/MainActivity.java @@ -9,11 +9,14 @@ import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; +import com.crashlytics.android.Crashlytics; import com.github.florent37.materialviewpager.MaterialViewPager; import com.github.florent37.materialviewpager.header.HeaderDesign; import com.github.florent37.materialviewpager.sample.fragment.RecyclerViewFragment; import com.github.florent37.materialviewpager.sample.fragment.ScrollFragment; +import io.fabric.sdk.android.Fabric; + public class MainActivity extends AppCompatActivity { private MaterialViewPager mViewPager; @@ -27,6 +30,9 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + if(!BuildConfig.DEBUG) + Fabric.with(this, new Crashlytics()); + setTitle(""); mViewPager = (MaterialViewPager) findViewById(R.id.materialViewPager);