Comments (7)
Thanks for the feedback, I'll work on it.
Regarding checking the expandedFraction
, it should always return the correct value, unless you're using a Bounce or Overshoot interpolator. If that's not the case then it might be a bug which I'd like to fix.
By the way, checking the expansionFraction
value in the listener should have no impact on performance unless you're doing something else in every check. A float compare is trivial work for a modern (even mobile) CPU.
from expandablelayout.
From my check, the expansionFraction
param returns value from 0 to almost 1 (~0.9998...), but not 1, so I need to do some extra work to assume that it's closest to 1. A set of listeners to specific states would be very helpful. Anyway, thanks for the information.
from expandablelayout.
You're right, I just checked the code and internally I also had to work around the fact that the animator doesn't always reach 1.
I've opened ticket #33 to track this.
from expandablelayout.
Hi, i've tested my code and it works fine. 0 and 1 values were reached w/o problems. Link to gist
The result is:
- to open
data body was isCollapsed
expanding expansionFraction = 1.0
dataBody expending
- to close
data body was isExpanded
collapsing expansionFraction = 0.0
dataHeaderExpanded collapsing
P.S. Thanks for lib!
from expandablelayout.
@Savrov I think the problem doesn't occur on all interpolators. As far as I remember it works fine on the default one, which would explain why it's working for you.
from expandablelayout.
Fixed in 2.9
from expandablelayout.
Thanks a lot, it works now
from expandablelayout.
Related Issues (20)
- Expandable Layout not working in coordinator layout, But working smoothly in linear layout HOT 6
- 3 fill parent Accordion menus HOT 7
- Resetting child view when expanding other view HOT 4
- At a time one expand HOT 2
- Can I expand multiple views at the same time? HOT 3
- Request: Linear layout as root. HOT 3
- Scroll RecyclerView to show selected item expand on top HOT 1
- Indication Markers HOT 1
- Starting expanded HOT 1
- Start expanded HOT 1
- Move away from JCenter HOT 1
- library wont expand on androidx.constraintlayout:constraintlayout:2.0.4 HOT 1
- JCenter is scheduled for closing HOT 1
- mavenCentral() support HOT 1
- mavenCentral() support HOT 1
- Toggle with out clicking on expandable view
- toped working after went to MavenCentral() HOT 2
- How can expand the fist group programatically? HOT 1
- Scrolling to item position is not working
- Unable to download dependency from Maven HOT 2
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 expandablelayout.