XEditText provides several custom attributes to enhance standard EditText behavior. Use the app: namespace to access these features.
Key Attributes:
app:x_disableClear: Boolean. Set to true to disable the clear button.app:x_clearDrawable: Drawable (supports Vector Drawables). Customizes the icon used to clear text.app:x_hidePwdDrawable: Drawable. Custom icon for hiding password text.app:x_showPwdDrawable: Drawable. Custom icon for showing password text.app:x_pattern: String. Defines a pattern to separate text content (e.g., "3,4,4").app:x_separator: String. Defines the character used to separate text content based on the pattern.app:x_interactionPadding: Dimension (e.g., 16dp). Customizes the padding of the drawable interaction rect area.
Note on Password Input: When using custom password drawables, do not set android:gravity to center, center_horizontal, right, or end, otherwise the ClearDrawable will not appear.
<!-- Example: Password input with custom drawables and pattern separation -->
<com.xw.repo.XEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="password input, custom drawables"
android:inputType="textPassword"
app:x_clearDrawable="@mipmap/ic_clear"
app:x_hidePwdDrawable="@mipmap/ic_hide"
app:x_showPwdDrawable="@mipmap/ic_show"
app:x_pattern="3,4,4"
app:x_separator=" "/>