set different animation while push different view to navigation view in sencha touch - sencha-touch

I want to set different types of animation for each view that I push to the navigation view.
I had applied animation in the layout of the navigation view but it was applied to all the views of the navigation view.
Here I am adding my view like this and want to set animation here on a particular view.
button.up('navigationview').push({
xtype: 'rightPanel',
});

Tyr this One..
Ext.getCmp('Your Navigation View').getLayout().setAnimation('Which ever animation You want');
Following are some animation types.
cube *
fade
flip *
pop
slide
swipe *
Hope this help . .
Happy Coding

You can change the animation of the navigation view each time before pushing the new view.
Ext.ComponentManager.get("navigationview").getLayout().setAnimation('fade');

Related

Applyed animation moves view to the top of screen

To see my humidityImageView I need to scroll down a little bit.
When I apply this animation:
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(humidityImageView, View.Y,40);
objectAnimator.setDuration(2000);
objectAnimator.setRepeatCount(ValueAnimator.INFINITE);
objectAnimator.start();
it starts fromt the top of the screen, but not from the position of the humidityImageView in my ConstraintLayout.
How to make animation starts from the initial view position?
All I needed is replace View.Y to View.TRANSLATION_Y

React Native - Show View while Scrolling in Flatlist

I need to SHOW a view when scroll is started and HIDE a view when scroll is stopped.
To detect the scroll movement, there is two ways:
Called when the user begins to drag the scroll view.
onScrollBeginDrag={this.showView}
onScrollEndDrag={this.hideView}
Called when the momentum scroll starts and Ends
onMomentumScrollBegin={this.showView}
onMomentumScrollEnd={this.hideView}
Exptected Behaviour:
If continues scroll is happening, it should not hide the view even onScrollEndDrag is called and still show the view until onMomentumScrollEnd.
If continues scroll is not active, its should hide when onScrollEndDrag called
Actual Behaviour:
If continues scroll is happening, its hide the view when onScrollEndDrag is called and shows the view again until onMomentumScrollEnd. So in between view is disappeared and then its appears when drag released.
Call a debounced function in onScroll.
Debouncing will mean it is called at the end (or start) of a bunch of
events. More Info
// Debounce
this.ViewVisibility = lodash.debounce(this.ViewVisibility, 100);
onScroll={() => {
this.ViewVisibility();
}}
ViewVisibility = () => {
console.log('Debouncing');
this.hideView();
}

Prevent pull-to-refresh for ScrollView in react-native

Is there a way to prevent pull-to-refresh functionality for ScrollView component?
I want to be able scroll, but I don't wanna allow to pull down content of component and prevent situations like this:
You seem like you have placed the View containing you custom made action bar inside the scroll view, and what's happening in the image you provided isn't caused by pull-to-refresh it's provided by overscrolling so you got 2 solutions:
1-Place your action bar outside your ScrollView and make the action bar and the ScrollView childrens of 1 View.
2-Add alwaysBounceVertical={false} to your ScrollView props.
Hope this helps.
use a const refreshing = false , initially. Then on call of _onRefresh , change refreshing from false to true, and reinitialise the content of the scollview.

Immutable view inside zoomable scrollview [react-native]

i'd like to know if it's possible to put a View inside a zoomable ScrollView but when the user zooms the scrollview, the view's size wont change. The view must be inside the scrollview because the image on the scrollview is bigger than the screen and i`ll render the view overlaying the image in a precise x:y position.
thanks
kinda extreme go horse but if you put the prop onScroll inside scrolView you can get the zoom and divide the width/height of the view by the zoomScale
onScroll={(event) => this.setState({ zoomScale:event.nativeEvent.zoomScale})}

React Native NavigatorExperimental - Combine AnimatedView with CardStack

i 've a NavigationAnimatedView which rendering a ListView with pushed DetailsView.
In the NavigationHeader, on the rightComponent, i have a button and i want to display a view with NavigationCardStack from bottomToTop. How can i combine the two modes of navigation ?
Like the filters button on the F8 app on the home screen.
i don't understand how with a dispatch action (navigatePush ?) on the FiltersButton, i can't switch with a navigationCardStack to display a FilterViews from BottomToTop.
You can provide props to NavigationCard when you render it:
_renderScene(props) {
return (
<NavigationCard
style={NavigationCardStackStyleInterpolator.forVertical(props)}
...
Sorry that part isn't documented very well right now!