Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
upgraded version to 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
florent37 committed Jul 8, 2015
1 parent 3ffcd50 commit 541dba4
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .idea/libraries/answers_1_2_2.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/beta_1_1_3.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/crashlytics_2_4_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/crashlytics_core_2_3_3.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/fabric_1_3_4.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion materialviewpager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion materialviewpager/materialviewpager.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":materialviewpager" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="com.github.florent37" external.system.module.version="1.0.6" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":materialviewpager" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="com.github.florent37" external.system.module.version="1.0.7" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion sample/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/build
material_view_pager_keystore.jks
keyInfos.properties
keyInfos.properties
fabric.properties
22 changes: 21 additions & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
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"

defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 2
versionCode 3
versionName "1.0"
}

Expand Down Expand Up @@ -53,5 +69,9 @@ dependencies {
// transitive=true
//}

compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
transitive = true;
}

compile project(':materialviewpager')
}
10 changes: 10 additions & 0 deletions sample/sample.iml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/answers/1.2.2/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/beta/1.1.3/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics-core/2.3.3/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.crashlytics.sdk.android/crashlytics/2.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/io.fabric.sdk.android/fabric/1.3.4/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
Expand All @@ -80,12 +85,17 @@
<orderEntry type="jdk" jdkName="Android API 22 Platform (1)" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="kenburnsview-1.0.6" level="project" />
<orderEntry type="library" exported="" name="beta-1.1.3" level="project" />
<orderEntry type="library" exported="" name="crashlytics-core-2.3.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
<orderEntry type="library" exported="" name="answers-1.2.2" level="project" />
<orderEntry type="library" exported="" name="crashlytics-2.4.0" level="project" />
<orderEntry type="library" exported="" name="cardview-v7-22.2.0" level="project" />
<orderEntry type="library" exported="" name="picasso-2.5.2" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
<orderEntry type="library" exported="" name="fabric-1.3.4" level="project" />
<orderEntry type="module" module-name="materialviewpager" exported="" />
</component>
</module>
5 changes: 5 additions & 0 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<meta-data
android:name="io.fabric.ApiKey"
android:value="29cbd600bb8183011201895a931db91e93f2d614" />

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 541dba4

Please sign in to comment.