编写app的一些心得
来源:互联网 发布:亡者归来第三季 知乎 编辑:程序博客网 时间:2024/05/17 17:45
在使用listview这个控件的时候,我们难免遇到这样的问题:
ListView中的项目过多,造成其下方的控件被遮挡。
经过试验,我认为解决方法是:将ListView下方的控件放入线性布局容器中,这样下方的控件就不会被遮挡。
源代码如下
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FirstPageOfNoteBook" >
<ListView
android:id="@+id/noteList"
android:layout_width="match_parent"
android:layout_height="match_parent"
></ListView>
<LinearLayout
android:id="@+id/linearlayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true"
>
<Button
android:id="@+id/create"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="create a new note"/>
</LinearLayout>
</RelativeLayout>
当然目测自定义控件也是可行的,但是没有尝试过,欢迎大神指教~
- 编写app的一些心得
- 编写技术文章的一些心得
- 编写技术文章的一些心得
- 编写技术文章的一些心得
- Swift编写的一些完整的app
- 关于javascript类的编写与继承的一些心得
- 关于javascript类的编写与继承的一些心得
- 编写Windows服务应该注意的一些心得
- 编写Makefile的心得
- 编写openMP的心得
- 开发App的心得
- xml的一些心得!
- Vim的一些心得
- DWR的一些心得
- 一些测试的心得
- Qt 的一些心得
- Qt 的一些心得
- 学习的一些心得
- 理解Android DecorView
- static关键字
- Docker容器内多进程管理(二)-Monit
- Google浏览器(Chrome)快捷键大全
- CPU私有变量(per-CPU变量)
- 编写app的一些心得
- 开源连接池C3P0解析
- saturate_cast<uchar>( (g_nContrastValue*0.01)*( g_srcImage.at<Vec3b>(y,x)[c] ) + g_nBrightValue );
- CodeForces 550B Preparing Olympiad 暴搜
- poj-3723-生成树
- 基于主键映射的 一对一关系
- 不懂编程金融狗的葵花宝典03(python/K近邻法下篇/机器学习入门简单详细代码)
- ios sqlite 数据库文件的位置
- IO流之DataInputStream 、DataOutputStream