From a8e67a54034b648e9ecd6df40a4882d321f1ec2d Mon Sep 17 00:00:00 2001 From: Vegas <“qazmm69@gmail.com”> Date: Tue, 11 Nov 2025 15:34:50 +0700 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/activity.tsx | 165 ++++++++++++++++++++++++++++++++-------- app/_layout.tsx | 6 ++ 2 files changed, 139 insertions(+), 32 deletions(-) diff --git a/app/(tabs)/activity.tsx b/app/(tabs)/activity.tsx index 7ed553f..48b8cf0 100644 --- a/app/(tabs)/activity.tsx +++ b/app/(tabs)/activity.tsx @@ -1,12 +1,40 @@ import { ThemedView } from "@/components/themed-view"; -import { Text, SafeAreaView, StyleSheet, View, FlatList, ScrollView, TouchableOpacity } from "react-native"; +import { Text, SafeAreaView, StyleSheet, View, FlatList, ScrollView, TouchableOpacity, Dimensions } from "react-native"; +const screenWidth = Dimensions.get('window').width; +// const customWidth = screenWidth * 0.8; // 占屏幕宽度的 80% + + // import Swiper from 'react-native-swiper'; + export default function ActivityScreen() { return ( // SafeAreaView 适配顶部刘海 - / - 活动 + + + {/* 活动 */} + + + } + keyExtractor={item => item.id} + style={styles.contentLeft} + /> + + + + 2222 + + + + + + + + + + {/* @@ -19,9 +47,6 @@ export default function ActivityScreen() { And simple */} - - - ) } @@ -33,30 +58,106 @@ const styles = StyleSheet.create({ // 您可能还需要在这里设置背景颜色,以确保状态栏区域的颜色正确 backgroundColor: '#ccc' }, - wrapper: { - }, - slide1: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#9DD6EB' - }, - slide2: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#97CAE5' - }, - slide3: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#92BBD9' - }, - text: { - color: '#fff', - fontSize: 30, - fontWeight: 'bold' - } -}); + content1: { + // display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between', + // backgroundColor: 'hotpink', + // width: 375, + }, + leftWrapper: { + width: 80, // 固定宽度 + height: 180, + backgroundColor: 'yellow', + }, + contentLeft: { + // backgroundColor: 'yellow', + // width: 100, + // flexShrink: 0, + // width: 20, + }, + leftItem: { + backgroundColor: 'pink', + // padding: 20, + marginVertical: 8, + marginHorizontal: 16, + // width: 20, + + }, + leftTitle: { + fontSize: 14, + textAlign: 'center', + // width: 20, + + }, + contentRight: { + backgroundColor: 'skyblue', + flex: 1, + } + + + + + + + // wrapper: { + // }, + // slide1: { + // flex: 1, + // justifyContent: 'center', + // alignItems: 'center', + // backgroundColor: '#9DD6EB' + // }, + // slide2: { + // flex: 1, + // justifyContent: 'center', + // alignItems: 'center', + // backgroundColor: '#97CAE5' + // }, + // slide3: { + // flex: 1, + // justifyContent: 'center', + // alignItems: 'center', + // backgroundColor: '#92BBD9' + // }, + // text: { + // color: '#fff', + // fontSize: 30, + // fontWeight: 'bold' + // } +}); +type ItemProps = { title: string }; + +const LeftItem = ({ title }: ItemProps) => ( + + {title} + +); + +const letTypeList = [ + { + id: '0', + title: '捕鱼', + }, + { + id: '1', + title: '真人', + }, + { + id: '2', + title: '区块链', + }, + { + id: '3', + title: '棋牌', + }, + { + id: '4', + title: '电子', + }, + { + id: '5', + title: '体育', + }, +]; diff --git a/app/_layout.tsx b/app/_layout.tsx index f518c9b..df66932 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -1,3 +1,9 @@ +// App.js 或 index.js 文件的最顶部 +if (typeof setImmediate === 'undefined') { + global.setImmediate = function(callback, ...args) { + return setTimeout(callback, 0, ...args); + }; +} import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'; import { Stack } from 'expo-router'; import { StatusBar } from 'expo-status-bar';