@@ -3,9 +3,10 @@ import type { HomeStackParamList } from '../../navigation/HomeStack';
33import React , { useState } from 'react' ;
44import { ListTile } from '../../components/ListTile' ;
55import { Screen } from '../../components/Screen' ;
6- import { Text , Switch } from 'react-native' ;
6+ import { StyleSheet , Switch , Text , View } from 'react-native' ;
77import { APM } from 'instabug-reactnative' ;
88import { showNotification } from '../../utils/showNotification' ;
9+ import CustomGap from '../../components/CustomGap' ;
910
1011export const APMScreen : React . FC < NativeStackScreenProps < HomeStackParamList , 'APM' > > = ( {
1112 navigation,
@@ -17,16 +18,26 @@ export const APMScreen: React.FC<NativeStackScreenProps<HomeStackParamList, 'APM
1718 APM . setEnabled ( value ) ;
1819 showNotification ( 'APM status' , 'APM enabled set to ' + value ) ;
1920 } ;
21+ const styles = StyleSheet . create ( {
22+ switch : {
23+ flexDirection : 'row' ,
24+ justifyContent : 'space-between' ,
25+ } ,
26+ } ) ;
2027
2128 return (
2229 < Screen >
23- < Text > Enable APM:</ Text >
24- < Switch onValueChange = { toggleSwitch } value = { isEnabled } />
30+ < View style = { styles . switch } >
31+ < Text > Enable APM:</ Text >
32+ < Switch onValueChange = { toggleSwitch } value = { isEnabled } />
33+ </ View >
34+ { CustomGap . smallV }
2535 < ListTile title = "End App launch" onPress = { ( ) => APM . endAppLaunch ( ) } />
2636 < ListTile title = "Network Screen" onPress = { ( ) => navigation . navigate ( 'NetworkTraces' ) } />
2737 < ListTile title = "Traces" onPress = { ( ) => navigation . navigate ( 'ExecutionTraces' ) } />
2838 < ListTile title = "Flows" onPress = { ( ) => navigation . navigate ( 'AppFlows' ) } />
2939 < ListTile title = "WebViews" onPress = { ( ) => navigation . navigate ( 'WebViews' ) } />
40+ < ListTile title = "Complex Views" onPress = { ( ) => navigation . navigate ( 'ComplexViews' ) } />
3041 </ Screen >
3142 ) ;
3243} ;
0 commit comments