Skip to content

Commit

Permalink
fix calc
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinicius Sossella committed Feb 7, 2018
1 parent a1e8b32 commit 8dd2430
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

// compile 'com.github.OpenCraft:VerticalSeekBar:v1.0.11'

implementation project(':verticalseekbarlib')
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MainActivity : AppCompatActivity() {

})

seekbar.post { seekbar.applyInitialValue(1075, false) }
seekbar.post { seekbar.applyInitialValue(1075, true) }
}

}
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
android:layout_below="@+id/top"
android:clipChildren="false"
app:seekbar_backgroundColor="@color/colorPrimaryDark"
app:seekbar_max_value="2500"
app:seekbar_max_value="1000"
app:seekbar_step="25"
app:seekbar_thumb="@drawable/check_on"
app:seekbar_thumbMarginTop="-25dp"
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ buildscript {

allprojects {
repositories {
maven { url "https://jitpack.io" }
google()
jcenter()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ private void animateViews(float wantedY) {
callOnValueChanged(calculatedValue);
} else {
if (wantedY >= maxValueY) {
callOnValueChanged(value == maxValue ? 0 : maxValue);
int valueChanged = value == maxValue ? 0 : value - maxValue;
callOnValueChanged(valueChanged);
setYPosition(maxValueY, maxValueY);
}
if (wantedY <= 0) {
Expand Down

0 comments on commit 8dd2430

Please sign in to comment.