(args: EventData)
| 4 | import { StackLayout } from '@nativescript/core/ui/layouts/stack-layout'; |
| 5 | |
| 6 | export function toggle(args: EventData) { |
| 7 | const page = <Page>(<any>args.object).page; |
| 8 | |
| 9 | const getElementById = (id) => page.getViewById(id); |
| 10 | |
| 11 | const toggleBtn = <Button>getElementById('toggleUserInteraction'); |
| 12 | const isEnabled = toggleBtn.text === 'disable' ? true : false; |
| 13 | toggleBtn.text = !isEnabled ? 'disable' : 'enable'; |
| 14 | |
| 15 | (<Button>getElementById('testBtn')).isUserInteractionEnabled = !isEnabled; |
| 16 | (<Button>getElementById('testLabel')).isUserInteractionEnabled = !isEnabled; |
| 17 | (<StackLayout>getElementById('testStackLayout')).isUserInteractionEnabled = !isEnabled; |
| 18 | } |
| 19 | |
| 20 | export function test() { |
| 21 | console.log('onTap'); |
nothing calls this directly
no test coverage detected