设计在调用焦点时更改 TextInputLayout 的标签颜色?

Design to change label color of TextInputLayout when calling on focus?

这是我的代码

    emailEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {

                if (!hasFocus) {
                    EditText txtUser = (EditText) v;
                    String userName = txtUser.getText().toString();
                    if (!userName.isEmpty()) {
                        if (!isvaliduser(userName)&&!isValidEmail(userName)) {
                            inputLayoutEmail.setHint("email/snipe id is required to login");
                        }
                    } else {
                        inputLayoutEmail.setHint("email / snipe ID");
//                        inputLayoutEmail.setHintTextAppearance(R.style.hintText);
                    }
                }

            }

        });

我想应用提示 color.here 我正在使用设置提示 appearance.but 它不是 working.thanks 提前。

改用setHintTextColor

inputLayoutEmail.setHintTextColor(ContextCompat.getColor(context,R.color.black));