使用Android Studio Lint审查代码二

This commit is contained in:
huangzhuanghua
2016-04-25 18:12:52 +08:00
parent d13d396be2
commit b1f788585a
42 changed files with 42 additions and 220 deletions

View File

@ -539,7 +539,6 @@ public class DownloadDialog {
GridLayoutManager gridLayoutManager = new GridLayoutManager(
context, column);
recyclerView.setLayoutManager(gridLayoutManager);
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
RecyclerViewAdapter adapter = new RecyclerViewAdapter(platforms,
@ -682,7 +681,7 @@ public class DownloadDialog {
@SuppressWarnings("deprecation")
@Override
public void onBindViewHolder(final RecyclerViewHolder viewHolder,
final int location) {
int location) {
final ApkEntity apkEntity = platforms.get((row * column) * position
+ location);
@ -967,7 +966,7 @@ public class DownloadDialog {
}
} else if ("插件化安装".equals(status)) {
showPluginDialog(apkEntity,
RecyclerViewAdapter.this, location);
RecyclerViewAdapter.this, viewHolder.getPosition());
} else if ("安装".equals(status) || "安装更新".equals(status)) {
DownloadEntry downloadEntry = DownloadManager
.getInstance(context).get(
@ -987,7 +986,7 @@ public class DownloadDialog {
entryMap.remove(apkEntity.getUrl());
DownloadManager.getInstance(context).cancel(
apkEntity.getUrl());
notifyItemChanged(location);
notifyItemChanged(viewHolder.getPosition());
} else {
PackageManager manager = new PackageManager(
context);