android qq 消息页面 editview 获得焦点把 标题栏 顶上去 问题
16lz
2021-01-26
ListView 改成 ScrollView 也是有效果的,但改成RelativeLayout 却不行, 改成 RelativeLayout 嵌套 listview 也是可以得 , 可以 给我一个解释 为啥是这样的吗 ?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <RelativeLayout android:id="@+id/aaa" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_alignParentTop="true" android:background="@color/black" android:gravity="top" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="@string/hello_world" android:textColor="@color/white" android:textSize="20sp" /> </RelativeLayout> <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_alignParentBottom="true" android:background="@color/grey" > <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" > <requestFocus /> </EditText> </RelativeLayout> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@id/relativeLayout1" android:layout_below="@id/aaa" >// 将 ListView 改成 ScrollView 也是有效果的,但改成RelativeLayout 却不行,// 改成 RelativeLayout 嵌套 listview 也是可以得 , <ListView android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/black" android:visibility="visible" /> </RelativeLayout></RelativeLayout>
更多相关文章
- Android-ListView中嵌套(ListView)控件时item的点击事件不起作用
- RecyclerView嵌套GridView,RecyclerView的第一个item显示不全
- 禁止ScrollView内的控件改变之后自动滚动
- Android(安卓)SQLite 支持嵌套事务吗?
- Android中Fragment嵌套Fragment,切换Fragment时不显示视图的原因
- [Android]通过PhoneLookup读取所有电话号码
- android adb usb配置
- Android中StackOverflow的问题
- Android处理Home键方法小结