K
K
Konstantin_Pak_Swinburne2019-10-03 14:05:25
Android
Konstantin_Pak_Swinburne, 2019-10-03 14:05:25

I have 4 checkboxes... The user can click on three of them (any). The last fourth should become disabled. What to write in MainActivity.java?

In short, I have 4 checkboxes as shown in the picture below.
5d95d4c1264aa794428827.png
The task is this: to make it possible to check only three of them, any. The last fourth should become disabled. We work in Android Studio. In XML, everything is clear with the UI, IDs checkbox_lettuce, checkbox_tomato, checkbox_pickle, checkbox-onion. Question: What to register in MainActivity.java?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question