Git Product home page Git Product logo

Comments (4)

johan12345 avatar johan12345 commented on July 28, 2024 1

Hi Steve,

thanks for the bug report. The reason for that is that we use TextPaint.setAlpha(int) in multiple places, which overrides the alpha value of the original collapsed/expandedTitleTextColor, but that should be quite easy to fix by multiplying the original alpha value to the value that is set there. The place you would need to look at is https://github.com/opacapp/multiline-collapsingtoolbar/blob/master/multiline-collapsingtoolbar/src/main/java/net/opacapp/multilinecollapsingtoolbar/CollapsingTextHelper.java#L487. The first part of the if-clause applies on Android 4.2 and below (which does not support hardware-accelerated text drawing, which means the text is saved as a texture instead) and the else part is for Android 4.3 and later, so probably both parts need to be adjusted.

If you need help, you can just ask here or via email at [email protected].

Please note that all modifications I made to the original Support Library code are marked with comments to simplify updating the code with later changes in the Support Library. So if you do adjustments, these should of course also be marked if they aren't already.

from multiline-collapsingtoolbar.

codeversed avatar codeversed commented on July 28, 2024

Thanks @johan12345!

I have not had a chance to do any testing on this but plan on in soon. I see the reason it is setup like that for the blending but will just need to test a bit.

It may be as easy as just extracting the alpha out of the textColors but I would imagine that will break or cause other things to go wrong.

I also took notice here (could be related to this issue): https://github.com/opacapp/multiline-collapsingtoolbar/blob/master/multiline-collapsingtoolbar/src/main/java/net/opacapp/multilinecollapsingtoolbar/CollapsingTextHelper.java#L336
...that setCollapsedTextBlend and setExpandedTextBlend are not in the if statement below.

Again thanks, and I will keep you updated on any progress.

from multiline-collapsingtoolbar.

webserveis avatar webserveis commented on July 28, 2024

Yes I same poblem

<style name="TextAppearance.ExpandedTitle"
    parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
    <item name="android:textSize">26sp</item>
    <item name="android:textColor">@android:color/transparent</item>
</style>

Show title in black color when expanded, transparent = #00000000

from multiline-collapsingtoolbar.

johan12345 avatar johan12345 commented on July 28, 2024

@webserveis As written in the README, we can't spend much time to fix problems that don't occur in our app (we don't use transparent text there). I don't know if @codeversed is still working on fixing this, but if you want, you are welcome to try it too and send a Pull Request. I explained what needs to be adjusted in my post above.

from multiline-collapsingtoolbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.