TonnyL / Light

🍭 The usual Snackbar, but elegant
MIT License
548 stars 33 forks source link

The library Light has max lines allowed? #8

Closed dpulgarin closed 5 years ago

dpulgarin commented 5 years ago

Hi,

I have imported Light in my project to show, in special cases, long String alerts. The issue appears when the String has 3 lines or more, for example:

"Welcome" System.lineSeparator() "Name: Diego Gómez Pérez" System.lineSeparator() "You have agreed at 10:00 am"

With these Strings, Light shows:

"Welcome Name: Diego Gómez ..."

I think that you have a maximum of allowed lines, could you please solve it in some way?

Thanks!

TonnyL commented 5 years ago

Hi, @dpulgarin

The answer is yes. Light is based on TSnackBar, and TSnackBar has a maxLines limit of SnackBar text(https://github.com/AndreiD/TSnackBar/blob/master/topsnackbar/src/main/res/layout/tsnackbar_layout_include.xml#L29) and the value is 2 or 1 which is defined in android design library (https://github.com/material-components/material-components-android/blob/8f7dc21a27880eed391f45548a40de8189f31172/lib/java/com/google/android/material/snackbar/res/values/config.xml).

dpulgarin commented 5 years ago

Thanks @TonnyL .

Is solved!