为了账号安全,请及时绑定邮箱和手机立即绑定

如何在web.py自带的web server中提供静态文件访问?

如何在web.py自带的web server中提供静态文件访问?

喵喔喔 2018-10-16 13:08:02
如何在web.py自带的web server中提供静态文件访问
查看完整描述

1 回答

?
胡子哥哥

TA贡献1825条经验 获得超6个赞

/**
02
03 * 设置Listview的高度
04
05 */
06
07 public voidsetListViewHeight(ListView listView) {
08
09 ListAdapter listAdapter = listView.getAdapter();
10
11 if(listAdapter == null) {
12
13 return;
14
15 }
16
17 inttotalHeight = 0;
18
19 for (inti = 0; i < listAdapter.getCount(); i++) {
20
21 View listItem = listAdapter.getView(i, null, listView);
22
23 listItem.measure(0, 0);
24
25 totalHeight += listItem.getMeasuredHeight();
26
27 }
28
29 ViewGroup.LayoutParams params = listView.getLayoutParams();
30
31 params.height = totalHeight + (listView.getDividerHeight() * (listAdapter.getCount() - 1));
32
33 listView.setLayoutParams(params);
34
35 }



查看完整回答
反对 回复 2018-11-13
  • 1 回答
  • 0 关注
  • 721 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信