I have a custom view and I want to make it impossible to change the style on the XML. This is the view
class PrimaryButton @JvmOverloads constructor(
context: Context, attributeSet: AttributeSet? = null, defStyleAttr: Int =
R.attr.primary_button_style
) : MaterialButton(context, attributeSet, R.attr.primary_button_style)
and I want this to be impossible or do nothing.
<com.stuff.buttons.PrimaryButton
android:id="@+id/first_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Primary Button"
android:layout_margin="16dp"
style="@style/Small.Secondary.Button"
I want to force always the primary_button_style.