I am getting as “ALPHA_THRESHOLD cannot be resolved or is not the field of ViewConfiguration”
and my code is as follows
// If the view has 0 alpha, we set it to be invisible so as to prevent
// it from accepting touches
if (alpha < ViewConfiguration.ALPHA_THRESHOLD) {
v.setVisibility(INVISIBLE);
} else if (v.getVisibility() != VISIBLE) {
v.setVisibility(VISIBLE);
}
If you read the docs, you can see the class
ViewConfigurationdoesn’t have any accessible public constants.If you read the source you can see that
ALPHA_THRESHOLDis hidden (using@hideannotation).Also
PANEL_BIT_DEPTH = 24I have no experience in what you are trying to do or if it’s correct but you could replace your code with the following: