小编M S*_*dag的帖子

键盘显示时如何向上移动整个布局?

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_gravity="bottom"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <Button
            android:layout_width="match_parent"
            android:layout_height="wrap_content" /> 
        </LinearLayout>    

</FrameLayout>  
Run Code Online (Sandbox Code Playgroud)

在清单中:

 android:windowSoftInputMode="adjustPan"
Run Code Online (Sandbox Code Playgroud)

初始行为:

在此输入图像描述

目前的行为:

在此输入图像描述

期望的行为:

在此输入图像描述

如何实现所需的布局行为?adjustResize不适合,因为此选项调整布局大小.

谢谢你的回答!

android android-softkeyboard

20
推荐指数
1
解决办法
1万
查看次数

如何摆脱(Android Asset Studio - Icon Generator)中的透明背景空间?

当我上传我的图像(没有背景开始)时,无论我选择什么设置,它都会自动获得透明背景.我真的很喜欢" 方形 "形状(圆角)但是有太多多余的透明背景.当我看到手机上的图标时,与Facebook相比,它看起来很小.如何摆脱这个额外的背景空间,使其尽可能大?我的一个设置是关闭的吗?

在此输入图像描述

icons android

6
推荐指数
1
解决办法
5198
查看次数

如何在 SearchView 中删除 search_plate

在此处输入图片说明

我可以SearchView使用以下代码更改背景:

    mSearchView = (SearchView) findViewById(R.id.search_search_view);
    LinearLayout layout = (LinearLayout)mSearchView.findViewById(mSearchView.getContext().getResources().getIdentifier("android:id/search_bar", null, null));
    layout.setBackground(getResources().getDrawable(R.drawable.curve_stroke_border_white_bg));
Run Code Online (Sandbox Code Playgroud)

但是如何search_plate在搜索视图中删除(在图片中显示为红色)。

任何人都可以有任何想法请帮助我..

提前致谢。

android searchview

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

标签 统计

android ×3

android-softkeyboard ×1

icons ×1

searchview ×1