C
C#2mo ago
Git Racc

Help for cell height

I have this layout on my phone and would like to have the third column for Player 2 to have the 0 cell occupy full height of the column to avoid leaving empty space. as of now, my code looks like this, I'll only paste relevant parts: const containerStyle: ViewStyle[] = [ styles.commanderDamageContainer, numPlayers > 3 ? { flexDirection: "row" } : { flexDirection: "column" }, modalContainerStyle, ].filter(Boolean) as ViewStyle[]; ... ... case 1: return ( <View style={[containerStyle, {flexDirection: "column", justifyContent: "space-between"}]}> <View style={{flexDirection: "row", justifyContent: "center"}}> <View style={{ flexDirection: "column", justifyContent: "center"}}> {topLeft && renderCell(topLeft)} {bottomLeft && renderCell(bottomLeft)} </View> <View style={{flexDirection: "column", justifyContent: "center"}}> {topRight && renderCell(topRight)} {bottomRight && renderCell(player)} </View> <View style={{alignSelf: "center", height: "100%"}}> {renderCell(bottomRight)} </View> </View> </View> ); What should i do to achieve what I need? I'm super noob and trying to ask chatgpt about this just made me lose an hour of my time lol
No description
11 Replies
Buddy
Buddy2mo ago
$paste
MODiX
MODiX2mo ago
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
Git Racc
Git RaccOP2mo ago
thanks! will do right now
Git Racc
Git RaccOP2mo ago
BlazeBin - lwxypdswdlcd
A tool for sharing your source code with the world!
Git Racc
Git RaccOP2mo ago
im sorry if you'll see lot of weird stuff but it's my first attempt at building smth for mobile while having very very little knowledge of coding im thinking the issue relies at the definition of const containerStyle (line 81) and/or at 5 player layout but not sure why (line 118) i wish i had Unreal's UI design tools lol but I want to learn the basics
ティナ
ティナ2mo ago
you are asking on c# server
Git Racc
Git RaccOP2mo ago
Aint this c# code?
ティナ
ティナ2mo ago
import React from "react";
import { View, Text, TouchableOpacity, StyleSheet, ViewStyle } from "react-native";
import { PlayerBoxProps } from "../types/player";
import React from "react";
import { View, Text, TouchableOpacity, StyleSheet, ViewStyle } from "react-native";
import { PlayerBoxProps } from "../types/player";
is this c#?
Git Racc
Git RaccOP2mo ago
Danngggg thanks for helping me realise that😅 I mentioned I’m uber noob so…yeah 🙈 I thought whatever goes on vs code is c# lol
ティナ
ティナ2mo ago
vs code is just a text editor (but really powerful) and you can use it to type your thesis, and your thesis is not any programming language
Git Racc
Git RaccOP2mo ago
got yo, thanks for clarifying this haha

Did you find this page helpful?