@@ -3,7 +3,7 @@ import type { HomeStackParamList } from '../../navigation/HomeStack';
3
3
import React , { useState } from 'react' ;
4
4
import { ListTile } from '../../components/ListTile' ;
5
5
import { Screen } from '../../components/Screen' ;
6
- import { Switch , Text } from 'react-native' ;
6
+ import { StyleSheet , Switch , Text , View } from 'react-native' ;
7
7
import { APM } from 'instabug-reactnative' ;
8
8
import { showNotification } from '../../utils/showNotification' ;
9
9
import CustomGap from '../../components/CustomGap' ;
@@ -18,13 +18,20 @@ export const APMScreen: React.FC<NativeStackScreenProps<HomeStackParamList, 'APM
18
18
APM . setEnabled ( value ) ;
19
19
showNotification ( 'APM status' , 'APM enabled set to ' + value ) ;
20
20
} ;
21
+ const styles = StyleSheet . create ( {
22
+ switch : {
23
+ flexDirection : 'row' ,
24
+ justifyContent : 'space-between' ,
25
+ } ,
26
+ } ) ;
21
27
22
28
return (
23
29
< Screen >
24
- < Text > Enable APM:</ Text >
30
+ < View style = { styles . switch } >
31
+ < Text > Enable APM:</ Text >
32
+ < Switch onValueChange = { toggleSwitch } value = { isEnabled } />
33
+ </ View >
25
34
{ CustomGap . smallV }
26
- < Switch onValueChange = { toggleSwitch } value = { isEnabled } />
27
- { CustomGap . largeV }
28
35
< ListTile title = "End App launch" onPress = { ( ) => APM . endAppLaunch ( ) } />
29
36
< ListTile title = "Network Screen" onPress = { ( ) => navigation . navigate ( 'NetworkTraces' ) } />
30
37
< ListTile title = "Traces" onPress = { ( ) => navigation . navigate ( 'ExecutionTraces' ) } />
0 commit comments