android 关于listview scrollview 底部 控件无法显示的两个解决方案
方案一
用LinearLayout实现,代码如下:
<!-- 中奖纪录 by mhd -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/imagetip"
android:scaleType="fitXY"
android:src="@drawable/prizelist_ad" />
<ListView
android:layout_width="match_parent"
android:layout_height="0dp"
android:id="@+id/lv_prizelist"
android:layout_weight="1"
>
</ListView>
<include layout="@layout/footer_copyright" android:layout_height="wrap_content" android:layout_width="match_parent" />
</LinearLayout>
重点 ListView的 android:layout_weight="1"
方案二
用RelativeLayout实现,代码如下:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" > <Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" // set your button at the bottom
android:layout_centerHorizontal="true"
android:text="Button" /> <ListView
android:id="@android:id/list"
android:layout_above="@+id/button1" // place listview above button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
>
</ListView> </RelativeLayout>
重点是 android:layout_alignParentBottom="true"
android 关于listview scrollview 底部 控件无法显示的两个解决方案的更多相关文章
- 让ListView中的控件失去焦点:android:descendantFocusability="blocksDescendants"
值得注意的是,ListView中的控件不能设置clickable="true",否则会无视父控件的blockDescendants. 可参考: https://segmentfau ...
- android学习日记03--常用控件button/imagebutton
常用控件 控件是对数据和方法的封装.控件可以有自己的属性和方法.属性是控件数据的简单访问者.方法则是控件的一些简单而可见的功能.所有控件都是继承View类 介绍android原生提供几种常用的控件bu ...
- Android开发中目前流行控件和知识点总结
Android开发中目前流行控件和知识点总结 1.SlidingMenu 滑动菜单 应用案例:Facebook . Path 2.0 .人人.网易新闻 下载地址: https://github.c ...
- Android高效率编码-细节,控件,架包,功能,工具,开源汇总,你想要的这里都有
Android高效率编码-细节,控件,架包,功能,工具,开源汇总 其实写博客的初衷也并不是说什么分享技术,毕竟咱还只是个小程序员,最大的目的就是对自我的知识积累,以后万一编码的时候断片了,也可以翻出来 ...
- ScrollView子控件高度设置无效
ScrollView子控件高度设置无效 简述 项目中引入了第三方的下拉刷新包PullToRefreshScrollView. 由于我之前布局未考虑下拉刷新功能.后来暂时发现添加上去,发现.子控件的高度 ...
- Android开源的精美日历控件,热插拔设计的万能自定义UI
Android开源的精美日历控件,热插拔设计的万能自定义UI UI框架应该逻辑与界面实现分离,该日历控件使用了热插拔的设计 ,简单几步即可实现你需要的UI效果,热插拔的思想是你提供你的实现,我提供我的 ...
- Android UI开发之开源控件项目整理
一.Banner 1.https://github.com/youth5201314/banner Android广告图片轮播控件,支持无限循环和多种主题,可以灵活设置轮播样式.动画.轮播和切换时间. ...
- Android布局属性与常用控件
一.Android常用布局属性 1. LinearLayout的特有属性 android:orientation:设置布局排列方式 android:layout_weight:设置所占布局的权重 ...
- Android自定义控件之自定义组合控件
前言: 前两篇介绍了自定义控件的基础原理Android自定义控件之基本原理(一).自定义属性Android自定义控件之自定义属性(二).今天重点介绍一下如何通过自定义组合控件来提高布局的复用,降低开发 ...
随机推荐
- jquery组件和插件写法
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name ...
- ajax post提交空字符串(string.Empty) MVC接收为null的问题
ajax post提交空字符串(string.Empty) MVC接收为null的问题 这个问题查了好多资料才知道原因: if (bindingContext.ModelMetadata.Conver ...
- win7激活之系统保留分区的设置与隐藏
激活动具:WIN7Activation_1.7 步骤: 1.直接点激活 2.若提示需设置驱动器号: 右键计算机-管理-磁盘管理-系统保留上点右键-更改驱动器号和路径-添加-点确定即可 3.激活win7 ...
- axure 认证授权注册码2017-12-25
Licensee: University of Science and Technology of China (CLASSROOM)Key: DTXRAnPn1P65Rt0xB4eTQ+4bF5IU ...
- Final阶段第1周/共1周 Scrum立会报告+燃尽图 02
作业要求[https://edu.cnblogs.com/campus/nenu/2018fall/homework/2481] 版本控制:https://git.coding.net/liuyy08 ...
- oracle 统计sql
最近在研究项目时发现如下sql, select 3 agentOfGCount, 0 workingCount, 0 restingCount, 0 busyingCount, 0 connectin ...
- webbench源码学习-->命令行选项解析函数getopt和getopt_long函数
对于webbench这个网站压力测试工具网上介绍的很多,有深度详解剖析的,对于背景就不在提了, 听说最多可以模拟3万个并发连接去测试网站的负载能力,这里主要是学习了一下它的源码,做点 笔记. 官方介绍 ...
- 保护 iOS 用户数据安全: Keychain 和 Touch ID
原文:How To Secure iOS User Data: The Keychain and Touch ID 作者:Tim Mitra 译者:kmyhy 更新说明:本教程由 Tim Mitra ...
- WinForm 实现点击一个按钮,执行另一个按钮事件
C# 代码如下: private void button1_Click(object sender, EventArgs e) { this.button1.Click += new System.E ...
- Let the Balloon Rise map一个数组
Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the ...