我使用视图来显示动态arrayadapter.it工作但我滚动列表时显示的数据不规则变化.我希望我的列表视图只能填充一次,而不是所有的时间我滚动我的列表.有什么建议吗?这是我的代码
public View getView(int position, View convertView, ViewGroup parent) {
// A ViewHolder keeps references to children views to avoid unneccessary calls
// to findViewById() on each row.
ViewHolder holder;
// When convertView is not null, we can reuse it directly, there is no need
// to reinflate it. We only inflate a new View when the convertView supplied
// by ListView is null.
if (convertView == null) {
convertView = mInflater.inflate(R.layout.sample, null);
// Creates a ViewHolder and …Run Code Online (Sandbox Code Playgroud) 任何人都可以告诉什么是Inflator是什么以及如何在Android应用程序中使用它?
我不知道它的确切用法以及为什么使用它.