stepstone-tech / android-material-stepper

This library allows to use Material steppers inside Android applications.
Apache License 2.0
1.78k stars 262 forks source link

Expose onNext() and onBackClicked() as public APIs #267

Open ashishDulhaniNP opened 5 years ago

ashishDulhaniNP commented 5 years ago

Make sure these boxes are checked before submitting your issue - thank you!

Thank you for such a beautiful library. It's very flexible but I was caught up in an issue which I thought would be a common use case. But it seems, to the best of my findings on internet, no one came across it.

I have a requirement in which I have to take the user to previous step on back click (Android system back button). I have gone through the docs and also the code and I cannot figure out how to implement it.

I can see that onNext and onBackClicked are private methods. What if I want to invoke these methods on some custom events?

With latest version of library, is it possible to do so?

Also, I don't have back button in my wireframe and the next button takes the full width at the bottom styled in line with my app theme. I was able to achieve that partially by hiding back button and providing the next button app theme using attributes provided in the doc. But still it doesn't fit perfectly. For instance, the text on the button is not at the vertical centre of the button (and I have tried applying the textAlignment and other properties to the button but it doesn't seem to work).

I was hoping Next and Back might be more open to client specific styling.

I am not sure, but can this be enhancement?

img_0648 1

ashishDulhaniNP commented 5 years ago

Hi, any updates on this? Or work arounds?

jdepypere commented 5 years ago

Regarding your first comment, StepperLayout.onBackClicked() is public.