Comments (4)
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.
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.
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.
@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)
- Align background with expanded text HOT 3
- Scrim color doesn't persist HOT 2
- Text get duplicated if it's not in English HOT 1
- Revert to single line when changing title text size with TextAppearance HOT 1
- Multiline not working with TextSize<21 SP HOT 4
- How to fix Toolbar Background color?
- Error HOT 2
- How to enlarge image on a backdrops HOT 1
- expandedTitleMarginEnd not working
- New line without the need HOT 5
- Failed to resolve: net.opacapp:multiline-collapsingtoolbar:1.6.0 HOT 6
- Link versions to support library dependency version HOT 3
- Update library to Support Library version 27.1.1 HOT 1
- Add subtitles HOT 1
- crash-CollapsingTextHelper#calculateUsingTextSize HOT 2
- Update library to Support Library version 28.0.0 HOT 3
- Migrating to AndroidX HOT 7
- Custom Font family HOT 1
- Duplicated title HOT 7
- JCenter migration HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multiline-collapsingtoolbar.