Skip to content

Commit

Permalink
Merge pull request getodk#3531 from grzesiek2010/COLLECT-3530
Browse files Browse the repository at this point in the history
Fixed readOnly in select widgets
  • Loading branch information
seadowg authored Dec 16, 2019
2 parents 90b6122 + b87c46b commit 0f6558c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ View setUpNoButtonsView(int index) {
view = missingImage;
}

view.setEnabled(!getFormEntryPrompt().isReadOnly());
int itemPadding = context.getResources().getDimensionPixelSize(R.dimen.select_item_border);
int paddingStartEnd = context.getResources().getDimensionPixelSize(R.dimen.margin_standard);
view.setPadding(paddingStartEnd, itemPadding, paddingStartEnd, itemPadding);
Expand Down Expand Up @@ -244,6 +243,7 @@ void bind(final int index) {
view.removeAllViews();
view.addView(setUpNoButtonsView(index));
view.setOnClickListener(v -> onItemClick(filteredItems.get(index).selection(), v));
view.setEnabled(!getFormEntryPrompt().isReadOnly());
} else {
addMediaFromChoice(audioVideoImageTextLabel, index, createButton(index, audioVideoImageTextLabel), filteredItems);
audioVideoImageTextLabel.setEnabled(!getFormEntryPrompt().isReadOnly());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void setStructures() {

optionView.addView(choice);

optionView.setEnabled(!getFormEntryPrompt().isReadOnly());
optionView.setOnClickListener(new OnClickListener() {

@Override
Expand Down

0 comments on commit 0f6558c

Please sign in to comment.