Fix incorrect incompatible greying due to view reuse

This commit is contained in:
Ciaran Gultnieks 2012-09-19 21:37:22 +01:00
parent 3c02e3ccc1
commit 5329e4431a
2 changed files with 6 additions and 10 deletions

View File

@ -138,11 +138,9 @@ public class AppDetails extends ListActivity {
}
// Disable it all if it isn't compatible...
if (!apk.compatible) {
View[] views = { v, version, status, size, buildtype, added };
for (View view : views) {
view.setEnabled(false);
}
View[] views = { v, version, status, size, buildtype, added };
for (View view : views) {
view.setEnabled(apk.compatible);
}
return v;

View File

@ -91,11 +91,9 @@ public class AppListAdapter extends BaseAdapter {
}
// Disable it all if it isn't compatible...
if (!app.compatible) {
View[] views = { v, status, summary, license, name };
for (View view : views) {
view.setEnabled(false);
}
View[] views = { v, status, summary, license, name };
for (View view : views) {
view.setEnabled(app.compatible);
}
return v;