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 1
1
<template >
2
2
<GridLayout id =" test1" rows =" auto auto" height =" 300" backgroundColor =" yellow" >
3
3
<!-- 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" >
5
5
<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 >
7
9
<GridLayout id =" test4" row =" 1" v-if =" showExtraContent" >
8
10
<Label text =" Extra content" ></Label >
9
11
</GridLayout >
14
16
<script lang="ts">
15
17
import * as frameModule from ' @nativescript/core/ui/frame' ;
16
18
import Vue from ' vue' ;
19
+ import NativeScriptVue from ' nativescript-vue' ;
20
+ import BottomSheetInnerKeyboardVue from ' ./BottomSheetInnerKeyboard.vue' ;
17
21
18
22
export default Vue .extend ({
19
23
data() {
@@ -30,6 +34,15 @@ export default Vue.extend({
30
34
},
31
35
toggleExtraContent() {
32
36
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
+ });
33
46
}
34
47
}
35
48
});
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<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 >
3
6
<MDTextField margin =" 10" variant =" filled" hint =" Working TextView hint 🤪" />
4
7
<PreviousNextView />
5
8
</StackLayout >
@@ -16,6 +19,9 @@ export default Vue.extend({
16
19
methods: {
17
20
onShownInBottomSheet(args ) {
18
21
console .log (' onShownInBottomSheet' );
22
+ },
23
+ onButtonTap(event ) {
24
+ this .$closeBottomSheet (event .object .id );
19
25
}
20
26
}
21
27
});
Original file line number Diff line number Diff line change 4
4
<NavigationButton text =" Back" android.systemIcon =" ic_menu_back" @tap =" onNavigationButtonTap" ></NavigationButton >
5
5
</ActionBar >
6
6
<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" />
8
9
<Button margin =" 10" rippleColor =" red" fontSize =" 20" text =" elevated button" />
9
10
<Label margin =" 10" horizontalAlignment =" center" backgroundColor =" yellow" padding =" 10" elevation =" 1" borderRadius =" 20" rippleColor =" red" text =" elevated text" />
10
11
<Label margin =" 10" horizontalAlignment =" center" padding =" 10" backgroundColor =" yellow" dynamicElevationOffset =" 3" elevation =" 1" rippleColor =" red" text =" elevated text" />
11
12
<StackLayout class =" cardView" height =" 100" orientation =" horizontal" >
12
13
<Label width =" 100%" textAlignment =" center" verticalAlignment =" center" text =" elevated text" />
13
14
</StackLayout >
14
15
</StackLayout >
16
+ </StackLayout >
15
17
</Page >
16
18
</template >
17
19
@@ -34,6 +36,9 @@ export default Vue.extend({
34
36
methods: {
35
37
onNavigationButtonTap() {
36
38
frameModule .Frame .topmost ().goBack ();
39
+ },
40
+ onButtonTap() {
41
+ console .log (' onButtonTap' );
37
42
}
38
43
},
39
44
You can’t perform that action at this time.
0 commit comments