【发布时间】:2013-03-14 08:59:37
【问题描述】:
目前我正在接受培训,我正在开发一个在线文件管理应用程序。 当我尝试使用拇指显示许多图像(100 个图像或 200 个)时,滚动出现问题 GridView 滚动非常长。
我从我为小图像设置的可绘制和布局参数的服务器下载图像,这是我的代码:
public void openImageWithCache(boolean loopTry, final ImageView iconView,
final LayoutParams layoutParams, final View v, final Node o) {
//if (v.getTag() == previewT){
try {
String prefix = (true ? "thumb_mini" : "");
File cacheFile = new File(AjaXplorerApplication.getCacheFolder(),
(prefix) + previewT.getUuidPath());
if (cacheFile.exists()) {
iconView.setImageDrawable(Drawable.createFromPath(cacheFile
.getPath()));
iconView.setLayoutParams(layoutParams);
//iconView.invalidate();
//loopTry = true;
return;
}
【问题讨论】:
-
String prefix = (true ? "thumb_mini" : "");没用prefix将永远等于"thumb_mini"->String prefix = "thumb_mini";。 -
斜体 粗体
Thank's i corrected that but i have the same problem with scrolling it still very very slow.
标签: java android gridview scroll