关于三星I9003当我滚动视图造成图形噪音。可能是什么问题呢?Android滚动tablelayout造成图形噪音
首先我读取包含特定结构的XML文件,并将该结构放入arrayList。
对于从ArrayList中我做每一个元素:
//这里不用像为5px * 10px的
tr = new TableRow(this);
ImageView triangle = new ImageView(this);
params = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
params.gravity = 0x11;
params.span = 8;
triangle.setBackgroundResource(R.drawable.complex_grey_down);
triangle.setLayoutParams(params);
tr.addView(triangle);
tl.addView(tr, params);
// here goes main title of the row
tr = new TableRow(this);
child = new TextView(this);
child.setText(sn.getName());
params = new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT);
params.gravity = 0x11;
params.span = 8;
child.setTypeface(null, Typeface.BOLD);
child.setTextColor(res.getColor(R.color.text));
child.setLayoutParams(params);
tr.addView(child);
tl.addView(tr, params);
// here goes short note under the title
if (sn.getNote().length() > 0) {
tr = new TableRow(this);
child = new TextView(this);
child.setText(sn.getNote());
child.setTextSize(12);
child.setPadding(30, 5, 30, 10);
child.setTextColor(res.getColor(R.color.text));
child.setGravity(Gravity.CENTER);
params = new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.FILL_PARENT);
params.gravity = 0x11;
params.span = 8;
child.setLayoutParams(params);
tr.addView(child);
}
tl.addView(tr, params);
}
的小图像添加这样的手机不能处理它10+行之后。这种结构对于某些手机来说太复杂了。并使用表格布局和复杂的行与多个textviews和imageviews的少量对这些内容
嗯,我实现sackOfViewsAdapter,但它不帮助正确的解决方案。在相同的三星手机应用程序无法正常工作。我注意到一件事,如果你安装后第一次启动应用程序,一切正常,屏幕上没有滞后和图形“噪音”,但是当应用程序被强制关闭并重新开始时,所有这些奇怪的事情都会发生