Ramotion / fluid-slider-android

:octocat:💧 A slider widget with a popup bubble displaying the precise value selected. Android library made by @Ramotion
https://www.ramotion.com/agency/app-development/
MIT License
1.42k stars 147 forks source link

how can i get the bubble value #26

Closed mima5 closed 5 years ago

mima5 commented 6 years ago

Hello Am fresh at java can you please tell me how i get the value of the bubble how can i store the value ?

dazfx commented 5 years ago

import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1;

private float _initialPosition;
private float _position;

slider.setPositionListener(new Function1<Float, Unit>() { @Override public Unit invoke(Float pos) { _position = pos; tw2 = (TextView) findViewById(R.id.textView2); tw2.setText(String.valueOf((int) (min + ((max - min) * _position)))); return Unit.INSTANCE; } });