opacapp / multiline-collapsingtoolbar

A modified CollapsingToolbarLayout that can deal with multiline titles
Other
782 stars 114 forks source link

text width and animation fix #46

Closed SimonSchubert closed 6 years ago

SimonSchubert commented 7 years ago

Before the changes the width of the Text shrinked when multiple items in the Toolbar. With a few lines of code changes in the CollapsingTextHelper.java that bug seems to be fixed.

johan12345 commented 6 years ago

Hi @SimonSchubert ,

first of all, thank you very much for your pull request! 🎉

I have tried it out and it does fix the issue #26. However, I tried removing the additional toolbar items in the demo app and setting the expanded text size back to 26sp and it showed the following behavior:

i.e. the first line is now too long during the transition between the expanded and the collapsed state. Could you please check this?

Additionally - if possible - could you use Android Studio's code formatting feature (Ctrl+Alt+L), which would insert spaces in some appropriate places (e.g. after if), and insert comments marking the modifications (as already done in other places), which helps us when updating the library with new support library versions. The latter only affects line 717, because the other changes are already in // BEGIN MODIFICATION / // END MODIFICATION blocks.

SimonSchubert commented 6 years ago

@johan12345 Sorry for the late reply. Ops, you are right, there is something wrong. I can also reproduce the bug. I will have a look into it and give you feedback around next week. Thank you for the time and that you had a look into it 👍

PattaFeuFeu commented 6 years ago

Any news on this matter? :) @SimonSchubert

SimonSchubert commented 6 years ago

@johan12345 @PattaFeuFeu I pushed a fixed version and tested it on various devices with different text lengths and number of icons. I also added the BEGIN MODIFICATION / // END MODIFICATION blocks. Please have a look and check if it works for you too :)

johan12345 commented 6 years ago

Looks great, thank you very much! :)

SimonSchubert commented 6 years ago

Awesome :) thank you too for the work and keeping the library up to date