stepstone-tech / android-material-stepper

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

Text under step possible? #205

Closed Rainer-Lang closed 6 years ago

Rainer-Lang commented 6 years ago

I want to have the text not on the right of the step, I need the text under the step.

Rainer-Lang commented 6 years ago

I want to set my own layout instead of R.layout.ms_step_tab in StepTap. But I also cannot extend StepTapbecause of:

@RestrictTo(LIBRARY)
public class StepTab

Maybe someone has a good hint...

zawadz88 commented 6 years ago

Hi @Rainer-Lang, This has been already requested in #183.

I had a quick at this before my holidays, but I found it a bit tricky due to changing tab container height - there's a different height if there's a step subtitle or a step error message.

Rainer-Lang commented 6 years ago

So what do you suggest? I think using not so much space on a mobile device would be good ux. I think this is something what could be very useful.

zawadz88 commented 6 years ago

I agree, yet I'm sure how to this in the library so that it provides the best user experience in all use cases. While it is clear to me what to do if at least one of the steps has a subtitle, I'm not sure what would be best when dealing with tab errors. Namely the following use case is bothering me: User has 3 steps with titles only (no subtitles). Then on one of the steps the verification fails and we show an error in the tab with a message - this actually adds a subtitle.

Now, I see 2 options here:

  1. We change the height of the entire container so that the bottom padding is maintained.
  2. Ignore the bottom padding here with a risk that something might get cut off or padding will be significantly smaller which might not be really eye-pleasing... Anyway, let's move the discussion to the original request.
Rainer-Lang commented 6 years ago

I'll try with a changed step layout and post a screenshot.