作者wu110011 (不下棋)
看板AndroidDev
标题[问题] 自订ListView的版面
时间Sun Sep 7 17:05:56 2014
按照android初学特训班书上范例
做一个自订版面的ListView
不过一执行就当机
实在不知道出错在哪
有高手能帮忙看一下吗?
档案连结如下
https://www.dropbox.com/s/dsgkbddjjvcp1cg/ListView_Test1_0907.rar?dl=0
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 42.79.35.59
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/AndroidDev/M.1410080760.A.658.html
1F:→ ccc585: 未看先猜null point exception 09/07 22:02
2F:→ laiair: 因为 MyAdapter 的 getView 是 return null 09/07 23:43
3F:→ laiair: 应该是 return convertView 才对 09/07 23:44
4F:→ wu110011: 谢谢,请问怎麽发现的呢? 09/08 09:48
5F:→ laiair: log 报 null point, onCreate 只有设定listView 09/08 11:47
6F:→ laiair: 所以就检查 MyAdapter 哪边有错 09/08 11:47