I would like to hide the Android Preference item dynamically.
the above items I want to hide it on the code.
In the case of (1), it looks like it is active, but it cannot be tapped
(2)In the case of , the indication appears as inactive.
As for the EditTextPreference mentioned above, if you look at the above, it would be better to use setVisible.
(3) If setVisible is not found in CheckBoxPreference, you will get in trouble.
Is there a way to hide check box items?
The official reference CheckBoxPreference specifies
If setVisible is not found in CheckBoxPreference, they will get in trouble.
This is not that CheckBoxPreference cannot use the
setVisible method, but the cause is completely different. You should think that you can't use what you should be using.
import is not done properly.
And import statement
Make sure that android X is selected properly.
setVisible is done without any problems.
© 2022 OneMinuteCode. All rights reserved.