collapsible-navbar's People
Forkers
mindaugas-jacionis sarangan desmondhume rollymaduk fsarmento github-clonner filmhomage jkbailey harrisonchan kriskate hoanganh1712 irvanda ryanlkuhn omars94 rickkoh jamperlark bonnmh pushpaintellect marius4896 ajimae vavilov2212 yasaminyaldaei anshulk21 yangxin1994 swapanil renee1978collapsible-navbar's Issues
Need to recompute _clampedScrollValue when offsetAnim changes
Thanks for creating this. Very useful!
Since the clampedScroll
depends on both the offsetAnim
and the scrollAnim
_clampedScrollValue
needs to be computed for both.
Here is my code (slightly modified to fit our client)
// Keep track of animation values because we need them when the scrolling ends.
const updateClampedScrollValue = diff => {
this._clampedScrollValue = Math.min(
Math.max(this._clampedScrollValue + diff, 0),
TOOLBAR_HEIGHT,
);
};
this._scrollAnim.addListener(({value}) => {
// clamped animation does not implement addListener but since the animation depends on the
// this anim we compute the value here.
const diff = value - this._scrollValue;
this._scrollValue = value;
updateClampedScrollValue(diff);
const {onScrolledToTop} = this.props;
onScrolledToTop(value === 0);
});
this._toolbarOffsetAnim.addListener(({value}) => {
// clamped animation does not implement addListener but since the animation depends on the
// this anim we compute the value here.
const diff = value - this._toolbarOffsetValue;
this._toolbarOffsetValue = value;
updateClampedScrollValue(diff);
});
}
Without this fix, scrolling a few pixels at a time ends up hiding the toolbar when it should be shown.
I can make this into a PR if you want?
Android FPS
Great stuff, however I'm only able to get 3FPS on Android devices. Do you think it has to do with Animation support on Android?
Cheers @janicduplessis
RefreshControl
Hi @janicduplessis,
Thanks a lot for this UI pattern, it's very usefull !
Juste one thing ; when i'm adding a RefreshControl to the AnimatedListView, the navbar is not collapsible anymore on Android only and I can't figure why (everything is working fine on IOS).
I saw you manage to handle it on the Th3rdwave app, can you give me an hint to make it work ?
Thanks a lot !
Illegal node ID set as an input for Animated.DiffClamp node
Hi i saw your fixed this issue. But i still getting this error(if i click animated view header button). Can u help me?
How can we use this for WebView
Thanks for creating this. Very useful!
Please help how can we use this for WebView
iOS scrollsToTop
Please look at the header
https://www.dropbox.com/s/neb61iatjzacnz8/collapsing_bug.mov?dl=0
After gesture release scroll still going with deceleration even if scrollsToTop happened.
when I was debugging https://github.com/facebook/react-native/blob/master/Libraries/NativeAnimation/Nodes/RCTDiffClampAnimatedNode.m#L49
it seems that it getting events from 2 sources
- scroll to to top
- decelerating scroll (which is not happening)
Thanks for this example working like a charm!
Illegal node ID set as an input for Animated.DiffClamp node
The app crashes on Android when closing the app with the back button and open it again (I did not test it on iOS). This gets resolved when cleaning the app from the background opened apps.
I think this is related to facebook/react-native#11317 which has an open PR facebook/react-native#12910.
So I'll re-test it when that PR is merged :) just keeping track of it here too.
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.