1
0
mirror of https://github.com/stom79/exodus-android-app synced 2024-12-23 09:48:42 +01:00

Fix handle for clicks when no content

This commit is contained in:
stom79 2018-04-14 11:50:04 +02:00
parent bd96568cc5
commit 9749d594d1

View File

@ -63,15 +63,18 @@ public class PermissionListAdapter extends RecyclerView.Adapter<PermissionListAd
permissionItemBinding.permissionName.setText(permission.name);
permissionItemBinding.permissionDescription.setText(permission.description);
manageExpanded(permission);
if( permission.description != null && permission.description.trim().length() > 0)
permissionItemBinding.mainLayout.setOnClickListener((View.OnClickListener) v -> {
permissionItemBinding.mainLayout.setOnClickListener((View.OnClickListener) v -> {
if( permission.description != null && permission.description.trim().length() > 0) {
permission.expanded = !permission.expanded;
manageExpanded(permission);
});
}
});
}
else
else {
permissionItemBinding.permissionName.setText(R.string.no_permissions);
permissionItemBinding.arrow.setText(" ");
}
}