Posts

Google Game RoomConfig.createAutoMatchCriteria, get the first player who joined the game

Image
0 I am creating the auto-match room with: Bundle autoMatchCriteria = RoomConfig.createAutoMatchCriteria(1, 1, role); And want to know the player who joins first, means the first player of the room. My game logic works on this, i.e some powers given to the first player only. How can I get this? android google-play-services google-play-games multiplayer real-time-multiplayer share | improve this question edited Jan 2 at 18:16 Fantômas 32.8k 15 64 90 asked Jan 2 at 17:15 jitain...

ScrollView snapping back despite having more items outside the scroll when setting it to horizontal

Image
0 I've got a ScrollView that doesnt behave as expected when setting direction of scroll to horizontal. As long as I dont have that set to true, everything is correct, however I don't get expected layout if I don't set it to horizontal(I do also want it to scroll horizontally) Here is a code: const AddCustomCategoryView = ({ phrases, categoryItems, onPress }) => { const chunkedPhrases = chunkArray(phrases || , 4); const length = chunkedPhrases.length; const dl = (length % 2 === 0 || portrait) ? length : (length + 1); const scrollWidth = calculateScrollWidth(length); const sectionWidth = 100 / dl; return ( <View style={{ flex: 1 }}> <ScrollView pagingEnabled horizontal style={{ width: scrollWidth.toString().concat('%') }} contentC...