Ver Fonte

福利房列表样式调整

zbb há 3 meses atrás
pai
commit
c9d97a152b
1 ficheiros alterados com 5 adições e 2 exclusões
  1. 5 2
      app/weal/room.tsx

+ 5 - 2
app/weal/room.tsx

@@ -3,6 +3,7 @@ import { useRouter } from 'expo-router';
 import React, { useCallback, useEffect, useRef, useState } from 'react';
 import {
     ActivityIndicator,
+    Dimensions,
     ImageBackground,
     RefreshControl,
     ScrollView,
@@ -251,6 +252,8 @@ export default function RoomScreen() {
   );
 }
 
+const { width: SCREEN_WIDTH } = Dimensions.get('window');
+
 const styles = StyleSheet.create({
   container: { flex: 1, backgroundColor: '#1a1a2e' },
   background: { flex: 1 },
@@ -299,8 +302,8 @@ const styles = StyleSheet.create({
   },
 
   // 房间列表
-  roomList: { paddingHorizontal: 15 },
-  roomItem: { width: '100%', height: 84, flexDirection: 'row', alignItems: 'center', paddingHorizontal: 16, marginBottom: 6, position: 'relative' },
+  roomList: { paddingHorizontal: 0, alignItems: 'center' },
+  roomItem: { width: SCREEN_WIDTH - 12, height: 84, flexDirection: 'row', alignItems: 'center', paddingHorizontal: 16, marginBottom: 6, position: 'relative' },
   officialBadge: { position: 'absolute', right: 0, top: 0, width: 48, height: 22 },
   officialImg: { width: '100%', height: '100%' },
   mustBeBadge: { position: 'absolute', left: 0, top: 0, width: 51, height: 51 },