永发信息网

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

答案:1  悬赏:30  手机版
解决时间 2021-03-23 02:03
  • 提问者网友:浮克旳回音
  • 2021-03-22 21:26
如何在web.py自带的web server中提供静态文件访问
最佳答案
  • 五星知识达人网友:像个废品
  • 2021-03-22 21:59

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 }
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯