diff --git a/.idea/libraries/materialviewpager_1_0_6.xml b/.idea/libraries/materialviewpager_1_0_6.xml
deleted file mode 100644
index 058bc97d..00000000
--- a/.idea/libraries/materialviewpager_1_0_6.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 0b41c978..f4f55346 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,10 @@ Material Design ViewPager easy to use library
#Sample
+
+
+
+
You can find a sample APK : [Link](https://github.com/florent37/MaterialViewPager/releases/download/1.0.3/sample-debug.apk)
And have a look on a sample Youtube Video : [Youtube Link](http://www.youtube.com/watch?v=r95Tt6AS18c)
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 28b9994b..49487888 100644
--- a/materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerAnimator.java
+++ b/materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerAnimator.java
@@ -1,17 +1,11 @@
package com.github.florent37.materialviewpager;
import android.content.Context;
-import android.graphics.Rect;
import android.os.Build;
-import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.StaggeredGridLayoutManager;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
-import android.webkit.WebView;
-import android.widget.ListView;
-import android.widget.ScrollView;
import com.github.ksoichiro.android.observablescrollview.ObservableScrollView;
import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks;
@@ -142,7 +136,7 @@ private void setScrollOffset(Object scroll, float yOffset) {
//do not re-scroll the source
if (scroll != null && yOffset >= 0) {
- scrollTo(scroll,yOffset);
+ scrollTo(scroll, yOffset);
//save the current yOffset of the scrollable on the yOffsets hashmap
yOffsets.put(scroll, (int) yOffset);
@@ -612,7 +606,7 @@ public void onViewPagerPageChanged() {
scrollDown(lastYOffset);
View visibleView = getTheVisibileView(scrollViewList);
- if(!canScroll(visibleView)){
+ if (!canScroll(visibleView)) {
followScrollToolbarLayout(0);
onMaterialScrolled(visibleView, 0);
}
diff --git a/sample/.gitignore b/sample/.gitignore
index 796b96d1..ce9b610d 100644
--- a/sample/.gitignore
+++ b/sample/.gitignore
@@ -1 +1,3 @@
/build
+material_view_pager_keystore.jks
+keyInfos.properties
\ No newline at end of file
diff --git a/sample/build.gradle b/sample/build.gradle
index 8c2d9f52..99df5bc8 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -8,9 +8,34 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
- versionCode 1
+ versionCode 2
versionName "1.0"
}
+
+ File signFile = project.file('keyInfos.properties')
+ if (signFile.exists()) {
+ Properties properties = new Properties()
+ properties.load(new FileInputStream(signFile))
+ signingConfigs {
+ release {
+ storeFile file(project.file(properties['keystore.filename']))
+ storePassword properties['keystore.password']
+ keyAlias properties['keystore.alias']
+ keyPassword properties['keystore.password']
+ }
+ }
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+
+ if (signFile.exists())
+ signingConfig signingConfigs.release
+ }
+ }
+
buildTypes {
release {
minifyEnabled false
@@ -24,9 +49,9 @@ dependencies {
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
- compile ('com.github.florent37:materialviewpager:1.0.6@aar'){
- transitive=true
- }
+ //compile ('com.github.florent37:materialviewpager:1.0.6@aar'){
+ // transitive=true
+ //}
compile project(':materialviewpager')
}
diff --git a/sample/sample.iml b/sample/sample.iml
index b6bdf679..cff01670 100644
--- a/sample/sample.iml
+++ b/sample/sample.iml
@@ -8,15 +8,12 @@
-
+
-
-
-
-
+
+
- generateDebugAndroidTestSources
- generateDebugSources
+ generateReleaseSources
@@ -27,29 +24,23 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -71,7 +62,6 @@
-
@@ -85,19 +75,17 @@
+
-
-
-
-
+
\ No newline at end of file
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 6361c867..b0f67133 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
@@ -92,13 +92,13 @@ public CharSequence getPageTitle(int position) {
public HeaderDesign getHeaderDesign(int page) {
switch (page) {
case 0:
- return HeaderDesign.fromColorResAndUrl(
- R.color.blue,
- "http://cdn1.tnwcdn.com/wp-content/blogs.dir/1/files/2014/06/wallpaper_51.jpg");
- case 1:
return HeaderDesign.fromColorResAndUrl(
R.color.green,
"https://fs01.androidpit.info/a/63/0e/android-l-wallpapers-630ea6-h900.jpg");
+ case 1:
+ return HeaderDesign.fromColorResAndUrl(
+ R.color.blue,
+ "http://cdn1.tnwcdn.com/wp-content/blogs.dir/1/files/2014/06/wallpaper_51.jpg");
case 2:
return HeaderDesign.fromColorResAndUrl(
R.color.cyan,
diff --git a/sample/src/main/res/layout/activity_main.xml b/sample/src/main/res/layout/activity_main.xml
index 6fc285e7..072f001f 100644
--- a/sample/src/main/res/layout/activity_main.xml
+++ b/sample/src/main/res/layout/activity_main.xml
@@ -10,7 +10,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:viewpager_logo="@layout/header_logo"
- app:viewpager_pagerTitleStrip="@layout/material_view_pager_pagertitlestrip_standard"
+ app:viewpager_pagerTitleStrip="@layout/material_view_pager_pagertitlestrip_newstand"
app:viewpager_logoMarginTop="100dp"
app:viewpager_color="@color/colorPrimary"
app:viewpager_headerHeight="200dp"