Move UI element with keyboard nativescript


#1

On my nativescript angular app - I have a button at the bottom of a screen. On the screen there is a Text area. When the user taps in the Text Area, a virtual keyboard appears. At this point, I want the button at the bottom to move up and appear just on top of the virtual keyboard. Any suggestions on how I can achieve this in both android and iOS?

Code

<GridLayout>
<ActionBar title="" backgroundColor="#f82462" top="0" left="0">
    <NavigationButton (tap)="goBack()"></NavigationButton>
</ActionBar>
<GridLayout rows="*, auto">
    <GridLayout row ='0' rows="auto *" columns="">
        <GridLayout row="0" rows="" columns="">
            <Button text="Top Button" (tap)="goNext()"></Button>                
        </GridLayout>
        <GridLayout row="1" backgroundColor="#f82462">
            <TextView [(ngModel)]="xyz" class="input" hint="Write your question as a complete sentence.Click on camera to add images if required." returnkeyType="done" id="questionText"></TextView>
        </GridLayout>
</GridLayout>
<StackLayout row='1'>
    <Button text="Next" (tap)="goNext()"></Button>
</StackLayout>
</GridLayout>