Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24822] Fix TableView issue on Android N #9144

Merged
merged 5 commits into from
Jun 26, 2017
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,23 +194,20 @@ public View getView(int position, View convertView, ViewGroup parent) {
// Default creates view for each Item
boolean sameView = false;
if (item.proxy instanceof TableViewRowProxy) {
TableViewRowProxy row = (TableViewRowProxy)item.proxy;
TableViewRowProxy row = (TableViewRowProxy) item.proxy;
if (row.getTableViewRowProxyItem() != null) {
sameView = row.getTableViewRowProxyItem().equals(convertView);
}
// TIMOB-24560: prevent duplicate TableViewRowProxyItem on Android N
if (Build.VERSION.SDK_INT > 23) {
ArrayList<Item> models = viewModel.getViewModel();
for (Item model : models) {
TableViewRowProxy proxy = (TableViewRowProxy) model.proxy;
if (proxy.getTableViewRowProxyItem().equals(convertView)) {
sameView = true;
v = null;
break;
}
}
}

// TIMOB-24560: prevent duplicate TableViewRowProxyItem on Android N
if (Build.VERSION.SDK_INT > 23) {
ArrayList<Item> models = viewModel.getViewModel();
if (models != null && models.contains(v.getRowData())) {
return v;
}
}

if (!sameView) {
if (v.getClassName().equals(TableViewProxy.CLASSNAME_DEFAULT)) {
if (v.getRowData() != item) {
Expand Down