Skip to content

Commit

Permalink
nested scrollview done
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak-Sangle committed Dec 13, 2023
1 parent bb5df4a commit 4a8fb41
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 11 deletions.
46 changes: 44 additions & 2 deletions mobile-client/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {CardStyleInterpolators} from '@react-navigation/stack'
import HomePage from './src/screens/HomePage';

import { ScrollView , Text, View} from 'react-native';
export default function App() {

let [fontsLoaded, fontError] = useFonts({
Expand Down Expand Up @@ -52,4 +52,46 @@ export default function App() {
</Stack.Navigator>
</NavigationContainer>
);
}
}

// export default function App() {

// return(
// <ScrollView style={{ backgroundColor : "red", padding :10}}>
// <Text style={{fontSize : 40, margin : 30}}>aeoufdhn</Text>
// <Text style={{fontSize : 40, margin : 30}}>aeoufdhn</Text>
// <Text style={{fontSize : 40, margin : 30}}>aeoufdhn</Text>
// <Text style={{fontSize : 40, margin : 30}}>aeoufdhn</Text>
// <ScrollView nestedScrollEnabled={true} style={{maxHeight : 500, backgroundColor : "green",}}>

// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>

// </ScrollView>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <ScrollView nestedScrollEnabled={true} style={{maxHeight : 500, backgroundColor : "green",}}>

// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>
// <Text style={{fontSize : 40, margin : 30}}>insied</Text>

// </ScrollView>
// <Text style={{fontSize : 40, margin : 30}}>aeoufdhn</Text>
// <Text style={{fontSize : 40, margin : 30}}>aeoufdhn</Text>
// </ScrollView>
// )
// }
15 changes: 7 additions & 8 deletions mobile-client/src/screens/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,16 @@ const HomePage = ({ route, navigation }) => {
{!openEvents[index] && <MaterialIcons name="expand-less" size={24} color="black" />}
</View>
</TouchableOpacity>
{/* <ScrollView
onTouchStart={()=> setScroll(false)}
onMomentumScrollEnd={() => setScroll(true)}
onScrollEndDrag={() => setScroll(true)}
> */}
<Animated.View style={{...styles.entryData, maxHeight}}>
<Animated.ScrollView
nestedScrollEnabled={true}
style={{maxHeight}}
>
<View style={{...styles.entryData}}>
<Text style={styles.entryText} >
{entry.detail}
</Text>
</Animated.View>
{/* </ScrollView> */}
</View>
</Animated.ScrollView>
</View>
);
})}
Expand Down
1 change: 0 additions & 1 deletion mobile-client/src/styles/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const styles = StyleSheet.create({
entryData: {
marginHorizontal : 5,
lineHeight: 1.5,
flex : 1,
},
mobileTopView: {
display: "flex",
Expand Down

0 comments on commit 4a8fb41

Please sign in to comment.