listview滚动时 会出现阴影 效果很差 解决办法 android:cacheColorHint="#00000000"
listview 在使用notifydatachanged 时会出现 The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread.
解决方法:将数据源改变 放到UI线程中
listview 滚动时 出现 不灵敏的问题:
使用缓存布局
if (convertView == null) {
convertView = mInflater
.nflate(R.layout.contacts_lv_item, null);
holder = new ViewHolder();
holder.tv_name = (TextView) convertView
.findViewById(R.id.tv_name);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
public final class ViewHolder {
public TextView tv_name;// 姓名
}
listview常见问题整理
最新推荐文章于 2018-10-04 10:33:35 发布