【问题标题】:Bottom Button Nativescript底部按钮 Nativescript
【发布时间】:2018-11-16 16:49:25
【问题描述】:

我有这个代码

<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

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

【问题讨论】:

  • 您的项目中是否包含了nativescript-iqkeyboardmanager 插件?

标签: nativescript angular2-nativescript nativescript-angular nativescript-telerik-ui


【解决方案1】:

nativescript-iqkeyboardmanager 应该适用于 iOS。

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

<activity
        android:name="com.tns.NativeScriptActivity"
        android:windowSoftInputMode="adjustResize"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:theme="@style/LaunchScreenTheme">

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-20
    • 2017-01-29
    • 2010-10-05
    • 2017-12-23
    • 2016-10-14
    • 2018-10-31
    相关资源
    最近更新 更多