I have strange problem.
Using this code, I get crash when try to make new LayoutParams, before "Error 5".
getScreenWidthAndHeight();
Log.d("Error", "1");
eField = (EditText)findViewById(R.id.emailField);
Log.d("Error", "2");
pField = (EditText)findViewById(R.id.passwordField);
Log.d("Error", "3");
signInButton = (Button)findViewById(R.id.singInButton);
Log.d("Error", "4");
RelativeLayout.LayoutParams lParamsForEField = new RelativeLayout.LayoutParams(eField.getWidth(), eField.getHeight());
Log.d("Error", "5");
RelativeLayout.LayoutParams lParamsForPField = (LayoutParams) pField.getLayoutParams();
Log.d("Error", "6");
RelativeLayout.LayoutParams lParamsForSignInButton = (LayoutParams) signInButton.getLayoutParams();
CLOSED
Caused by: java.lang.NullPointerException
Problem was in trying to find element before set layout for content view.