TextInputLayout has no effect for giving hint programmatically in EditText
You have to set hint to TextInputLayoutHere is the code.
TextInputLayout textInputLayout = (TextInputLayout)findViewById(R.id.text_input_layout);textInputLayout.setHint("Hello");
Updated
In Kotlin:
val textInputLayout = findViewById(R.id.text_input_layout)textInputLayout.hint = "Hello"