File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 11<template >
22 <GridLayout id =" test1" rows =" auto auto" height =" 300" backgroundColor =" yellow" >
33 <!-- highlighted in red to demonstrate movement -->
4- <GridLayout id =" test2" row =" 0" backgroundColor =" red" verticalAlignment =" top" >
4+ <Stacklayout id =" test2" row =" 0" backgroundColor =" red" verticalAlignment =" top" >
55 <Button @tap =" toggleExtraContent" text =" Toggle extra content" ></Button >
6- </GridLayout >
6+ <Button @tap =" openAnotherInner" text =" Open second" ></Button >
7+ <Button id =" innerButton" @tap =" onButtonTap" text =" close with result" ></Button >
8+ </Stacklayout >
79 <GridLayout id =" test4" row =" 1" v-if =" showExtraContent" >
810 <Label text =" Extra content" ></Label >
911 </GridLayout >
1416<script lang="ts">
1517import * as frameModule from ' @nativescript/core/ui/frame' ;
1618import Vue from ' vue' ;
19+ import NativeScriptVue from ' nativescript-vue' ;
20+ import BottomSheetInnerKeyboardVue from ' ./BottomSheetInnerKeyboard.vue' ;
1721
1822export default Vue .extend ({
1923 data() {
@@ -30,6 +34,15 @@ export default Vue.extend({
3034 },
3135 toggleExtraContent() {
3236 this .showExtraContent = ! this .showExtraContent ;
37+ },
38+ openAnotherInner() {
39+ (this as NativeScriptVue ).$showBottomSheet (BottomSheetInnerKeyboardVue , {
40+ // transparent:true,
41+ ignoreBottomSafeArea: true ,
42+ closeCallback : (... args ) => {
43+ console .log (' bottom sheet closed' , args );
44+ }
45+ });
3346 }
3447 }
3548});
Original file line number Diff line number Diff line change 11<template >
22 <StackLayout >
3+ <Stacklayout id =" test2" row =" 0" backgroundColor =" red" verticalAlignment =" top" >
4+ <Button id =" innerButtonK" @tap =" onButtonTap" text =" close with result k" ></Button >
5+ </Stacklayout >
36 <MDTextField margin =" 10" variant =" filled" hint =" Working TextView hint 🤪" />
47 <PreviousNextView />
58 </StackLayout >
@@ -16,6 +19,9 @@ export default Vue.extend({
1619 methods: {
1720 onShownInBottomSheet(args ) {
1821 console .log (' onShownInBottomSheet' );
22+ },
23+ onButtonTap(event ) {
24+ this .$closeBottomSheet (event .object .id );
1925 }
2026 }
2127});
Original file line number Diff line number Diff line change 44 <NavigationButton text =" Back" android.systemIcon =" ic_menu_back" @tap =" onNavigationButtonTap" ></NavigationButton >
55 </ActionBar >
66 <StackLayout >
7- <Button margin =" 10" rippleColor =" red" backgroundColor =" green" borderRadius =" 10" fontSize =" 20" text =" elevated button" />
7+ <StackLayout backgroundColor =" yellow" elevation =" 10" dynamicElevationOffset =" 3" >
8+ <Button margin =" 10" elevation =" 5" rippleColor =" red" backgroundColor =" green" borderRadius =" 10" fontSize =" 20" text =" elevated button" @tap =" onButtonTap" />
89 <Button margin =" 10" rippleColor =" red" fontSize =" 20" text =" elevated button" />
910 <Label margin =" 10" horizontalAlignment =" center" backgroundColor =" yellow" padding =" 10" elevation =" 1" borderRadius =" 20" rippleColor =" red" text =" elevated text" />
1011 <Label margin =" 10" horizontalAlignment =" center" padding =" 10" backgroundColor =" yellow" dynamicElevationOffset =" 3" elevation =" 1" rippleColor =" red" text =" elevated text" />
1112 <StackLayout class =" cardView" height =" 100" orientation =" horizontal" >
1213 <Label width =" 100%" textAlignment =" center" verticalAlignment =" center" text =" elevated text" />
1314 </StackLayout >
1415 </StackLayout >
16+ </StackLayout >
1517 </Page >
1618</template >
1719
@@ -34,6 +36,9 @@ export default Vue.extend({
3436 methods: {
3537 onNavigationButtonTap() {
3638 frameModule .Frame .topmost ().goBack ();
39+ },
40+ onButtonTap() {
41+ console .log (' onButtonTap' );
3742 }
3843 },
3944
You can’t perform that action at this time.
0 commit comments