@@ -3,7 +3,7 @@ import type { HomeStackParamList } from '../../navigation/HomeStack';
33import React , { useState } from 'react' ;
44import { ListTile } from '../../components/ListTile' ;
55import { Screen } from '../../components/Screen' ;
6- import { Switch , Text } from 'react-native' ;
6+ import { StyleSheet , Switch , Text , View } from 'react-native' ;
77import { APM } from 'instabug-reactnative' ;
88import { showNotification } from '../../utils/showNotification' ;
99import 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