acefalobi / android-stepper

A library for creating a wizard-like step-through user interface that uses navigation components and menus for displaying steps with advanced customization.
Apache License 2.0
325 stars 38 forks source link

Fixing missing step number on API < 28 #17

Closed mspnr closed 3 years ago

mspnr commented 3 years ago

Currently used card corner radius 100dp is for sure way to large. It looks like lower APIs do not process larger radii correctly. After some experiments 10dp appeared displayed correctly in the example app on devices with various APIs.

Should fix this issue https://github.com/acefalobi/android-stepper/issues/8

acefalobi commented 3 years ago

The issue with this is that it starts to become a square if you increase the size of the icon.

mspnr commented 3 years ago

If you want to keep it circle all the time, we can add such a line:

(iconView as MaterialCardView).radius = iconSizeInPX / 2f

after this line: https://github.com/acefalobi/android-stepper/blob/9859d114536e1a7015beb5fc1b77cefa1fa4955a/stepper/src/main/java/com/aceinteract/android/stepper/menus/tab/TabNumberedStepperMenu.kt#L167

acefalobi commented 3 years ago

Ok, this works then. Add it to the PR.

mspnr commented 3 years ago

I experimented a little bit with your example and understood, that it is better to place the radius update into updateUI function.

mspnr commented 3 years ago

@acefalobi do you willing to merge the PR? Please let me know if you see some problem or have some doubts.