Skip to content

Instantly share code, notes, and snippets.

Ashrith K S ashrithks

  • Bangalore
Block or report user

Report or block ashrithks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CollapseExpandMethod.js
moveToExpand = () => {
this.props.navigation.navigate('CollapseExpand', { transition: 'collapseExpand' });
}
View DefaultTransition.js
moveToSlideFromRight = () => {
this.props.navigation.navigate('SlideFromRight');
}
View CollapseExpand.js
let CollapseExpand = (index, position) => {
const inputRange = [index - 1, index, index + 1];
const opacity = position.interpolate({
inputRange,
outputRange: [0, 1, 1],
});
const scaleY = position.interpolate({
inputRange,
outputRange: ([0, 1, 1]),
View SlideFromRight.js
let SlideFromRight = (index, position, width) => {
const inputRange = [index - 1, index, index + 1];
const translateX = position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [width, 0, 0]
})
const slideFromRight = { transform: [{ translateX }] }
return slideFromRight
};
View TransitionConfig.js
const TransitionConfiguration = () => {
return {
transitionSpec: {
duration: 750,
easing: Easing.out(Easing.poly(4)),
timing: Animated.timing,
useNativeDriver: true,
},
screenInterpolator: (sceneProps) => {
const { layout, position, scene } = sceneProps;
@ashrithks
ashrithks / nestedScrollview
Created Oct 31, 2017
nestedScrollview in react native
View nestedScrollview
import React, { Component } from 'react';
import { View, ScrollView } from 'react-native';
export default class App extends Component {
constructor() {
super();
this.state = {
enabled:true
};
}
You can’t perform that action at this time.