Skip to content

Commit

Permalink
Fix being able to click through previous file pages
Browse files Browse the repository at this point in the history
  • Loading branch information
DSteve595 committed Oct 29, 2016
1 parent 3011392 commit 2f9dec6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId 'com.stevenschoen.putionew'
minSdkVersion 19
targetSdkVersion 25
versionCode 101
versionName '4.0 beta 4'
versionCode 102
versionName '4.0'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
Expand Down Expand Up @@ -51,11 +51,11 @@ dependencies {
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.tbruyelle.rxpermissions:rxpermissions:0.8.0@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.aurelhubert:ahbottomnavigation:1.5.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta2'
}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ open class NewFilesFragment : RxFragment() {
val folderFrontElevation = resources.getDimension(R.dimen.folder_front_elevation)

pagerView!!.setPageTransformer(true) { page, position ->
if (position < -1) {
page.visibility = View.VISIBLE
if (position <= -1) {
page.translationZ = 0f
} else {
page.translationZ = (position + 1) * folderFrontElevation
}
if (position < 0) {
if (position == -1f) {
// To prevent the previous page from being clickable through the current page
page.translationX == 0f
page.visibility = View.INVISIBLE
} else {
page.translationX = page.width * (-position * 0.5f)
}
Expand Down

0 comments on commit 2f9dec6

Please sign in to comment.