How to use final values inside CustomView? Trying to do as follows:
public class CustomView extends View { private static final int x; public CustomView(Context context, AttributeSet attrs) { super(context, attrs); x = getX(); } }
, but writes that the variable is not initialized. I don’t want to immediately indicate the value during the declaration, since it will be necessary to first get this value from the code.