Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be4ca2e

Browse files
AndrewAminInstabugAyaMahmoud148
authored andcommitted
chore: fix APM screen layout on android platform
1 parent 3211f6b commit be4ca2e

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

examples/default/src/screens/apm/APMScreen.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { HomeStackParamList } from '../../navigation/HomeStack';
33
import React, { useState } from 'react';
44
import { ListTile } from '../../components/ListTile';
55
import { Screen } from '../../components/Screen';
6-
import { Switch, Text } from 'react-native';
6+
import { StyleSheet, Switch, Text, View } from 'react-native';
77
import { APM } from 'instabug-reactnative';
88
import { showNotification } from '../../utils/showNotification';
99
import CustomGap from '../../components/CustomGap';
@@ -18,13 +18,20 @@ export const APMScreen: React.FC<NativeStackScreenProps<HomeStackParamList, 'APM
1818
APM.setEnabled(value);
1919
showNotification('APM status', 'APM enabled set to ' + value);
2020
};
21+
const styles = StyleSheet.create({
22+
switch: {
23+
flexDirection: 'row',
24+
justifyContent: 'space-between',
25+
},
26+
});
2127

2228
return (
2329
<Screen>
24-
<Text>Enable APM:</Text>
30+
<View style={styles.switch}>
31+
<Text>Enable APM:</Text>
32+
<Switch onValueChange={toggleSwitch} value={isEnabled} />
33+
</View>
2534
{CustomGap.smallV}
26-
<Switch onValueChange={toggleSwitch} value={isEnabled} />
27-
{CustomGap.largeV}
2835
<ListTile title="End App launch" onPress={() => APM.endAppLaunch()} />
2936
<ListTile title="Network Screen" onPress={() => navigation.navigate('NetworkTraces')} />
3037
<ListTile title="Traces" onPress={() => navigation.navigate('ExecutionTraces')} />

0 commit comments

Comments
 (0)