首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >具有顶部/底部layou_margin的EditText已由softinput覆盖

具有顶部/底部layou_margin的EditText已由softinput覆盖
EN

Stack Overflow用户
提问于 2015-04-02 10:52:43
回答 2查看 272关注 0票数 0

我有一个编辑框,它在LinearLayout中包含一个edittext和一个按钮,如下所示:

代码语言:javascript
运行
复制
 <LinearLayout
            android:id="@+id/et_bottom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#e5e5e5"
            android:gravity="center_vertical"
            android:orientation="horizontal" 
           >

            <EditText
                android:id="@+id/write_comment"
                android:layout_width="0dp"
                android:layout_height="30.5dp"
                android:layout_marginBottom="10.5dp"
                android:layout_marginLeft="5.5dp"
                android:layout_marginTop="10.5dp"
                android:layout_weight="2.0"
                android:background="@drawable/input_box_03"
                android:hint="@string/saysomething"
                android:paddingLeft="5dp"
                android:textColorHint="@color/font_gray"
                android:textSize="@dimen/login_edittext_font_size" />

            <TextView
                android:id="@+id/send_comment"
                android:layout_width="52dp"
                android:layout_height="29.5dp"
                android:layout_marginLeft="8.5dp"
                android:layout_marginRight="5.5dp"
                android:background="@drawable/box"
                android:clickable="true"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:gravity="center"
                android:text="@string/send"
                android:textColor="@color/font_color_white" />
   </LinearLayout>

LineraLayout位于与windowScreen大小匹配的RelativeLayout中,我设置了WindowInputSoftMode =“adjustResize”,然而,当显示软键盘时,LinearLayout的底部部分被软键盘覆盖。我不知道为什么和怎么做到的?

EN

Stack Overflow用户

发布于 2015-04-02 11:38:31

尝试使用

代码语言:javascript
运行
复制
android:windowSoftInputMode="stateVisible|adjustResize"
票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29404270

复制
相关文章

相似问题

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