首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >底部按钮原生脚本

底部按钮原生脚本
EN

Stack Overflow用户
提问于 2018-11-17 00:49:25
回答 1查看 713关注 0票数 0

我有这个代码

代码语言:javascript
复制
<ActionBar title="Home" class="action-bar"></ActionBar>
<GridLayout rows="auto, *, auto">
    <ScrollView col="0" row="1">
        <StackLayout>
            <GridLayout rows="auto, auto, auto, auto, *, 60">
                <StackLayout row="0" backgroundColor="#eee" class="p-20">
                    <Label text="Send email to"></Label>
                    <Label text="email@gmail.com"></Label>
                </StackLayout>
                <Label row="1" text="subject" class="p-10"></Label>
                <TextField row="2" hint="Enter text... "></TextField>
                <FlexboxLayout row="3" colSpan="2" justifyContent="space-between" class="p-10">
                    <Label text="message" class="label-title"></Label>
                    <Label class="label-title">
                        <FormattedString>
                            <Span text="20" padding="90"></Span>
                            <Span text="/"></Span>
                            <Span text="300"></Span>
                        </FormattedString>
                    </Label>
                </FlexboxLayout>
                <TextView row="4" text="" hint="Enter your message..."></TextView>
            </GridLayout>
        </StackLayout>
    </ScrollView>
    <GridLayout row="2">
        <Button text="send" class="btn-message"></Button>
    </GridLayout>
</GridLayout>

在游乐场上的作品如预期:https://play.nativescript.org/?template=play-ng&id=2oSzob

但在我的设备上没有,底部的按钮隐藏在键盘下面。谁能告诉我我哪里做错了?

EN

回答 1

Stack Overflow用户

发布于 2018-11-17 01:26:31

对于iOS,nativescript-iqkeyboardmanager应该可以工作。

对于安卓系统,确保在App_Resources/Android/src/main/AndroidManifest.xml中将windowSoftInputMode设置为adjustResize

代码语言:javascript
复制
<activity
        android:name="com.tns.NativeScriptActivity"
        android:windowSoftInputMode="adjustResize"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:theme="@style/LaunchScreenTheme">
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53342162

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档