我想动态创建一个新的TextInputLayout由我必须设置hintTextAppearance
正常工作。
如何设置hintTextAppearance动态?
TextInputLayout textInput = findViewById(text input id);
textInput.setHintTextAppearance(R.style.FloatingHintTextStyle);
<style name="FloatingHintTextStyle" parent="TextAppearance.Design.Hint">
<item name="android:textColor">@color/floating_hint_color</item>
</style>
因为你设置的EditText的文本外观hintTextAppearance将是相同的。