I want to create au custom TextInputLayout with a default style. But the style isn't applied.
class AutoCompleteTextInputLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = R.style.AppTheme_TextInputLayout_DropdownMenu
): TextInputLayout(context, attrs) {
init {
context.inflater.inflate(R.layout.auto_complete_text_input_layout, this,true)
}
}
<style name="AppTheme.TextInputLayout.DropdownMenu" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu">
<item name="endIconMode">dropdown_menu</item>
</style>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</merge>
I don't want this style to be applied by default for all TextInputLayout because I have already one like below:
<style name="AppTheme" parent="Theme.MaterialComponents.Light">
<item name="textInputStyle">@style/AppTheme.TextInputLayout</item>>
</style>
Thanks in advance for your help
