小编Fel*_*der的帖子

软键盘覆盖 ScrollView 布局中的 editText

我正在使用这种布局处理 Android 片段:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="@color/very_dark_transparent_grey"
    tools:ignore="MissingPrefix">

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <LinearLayout
        android:id="@+id/invite_code_input_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/spacing_semi_huge"
        android:gravity="center_horizontal"
        android:orientation="vertical">

        <TextView
            fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/join_fragment_invite_code"
            android:textColor="@color/white"
            android:textSize="@dimen/font_larger" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingLeft="@dimen/spacing_huge"
            android:paddingRight="@dimen/spacing_huge">

            <io.brandie.brandie.custom.InviteCodeEditText
                android:id="@+id/invite_code_edit_text"
                fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/spacing_smaller"
                android:cursorVisible="false"
                android:digits="1234567890"
                android:inputType="number"
                android:maxLength="6"
                android:textIsSelectable="false"
                android:textSize="32sp" />

        </LinearLayout>

        <TextView
            fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/spacing_large"
            android:layout_marginBottom="@dimen/spacing_large"
            android:text="@string/join_fragment_or"
            android:textColor="@color/lightGreen"
            android:textSize="@dimen/font_large"/>

    </LinearLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/invite_code_input_layout">

        <RelativeLayout
            android:id="@+id/message_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <TextView
                android:id="@+id/request_to_join_text"
                fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf" …
Run Code Online (Sandbox Code Playgroud)

android android-layout android-edittext

3
推荐指数
1
解决办法
1741
查看次数

标签 统计

android ×1

android-edittext ×1

android-layout ×1