-
Notifications
You must be signed in to change notification settings - Fork 1
CustomTextView
Sieun Ju edited this page Aug 11, 2022
·
2 revisions
- κ°λ¨ν μμ±κ°μΌλ‘ Corner, Border, Selected, Enable μ²λ¦¬ ν μ μλ ViewClass μ
λλ€.
(CustomTextView that can process Corner, Border, Selected, and Enable as attribute values.)
Attribute | Type | Description |
---|---|---|
textViewDefState | Boolean | Sets the default status value for the view. |
textViewTxtColor | Color | Text color value when view is active |
textViewDisableTxtColor | Color | Text color value when view is inactive |
textViewBgColor | Color | Background Color when view is active |
textViewBorder | Dimension | Background Border when view is active |
textViewBorderColor | Color | Background Border Color when view is active |
textViewCorner | Dimension | Background Corner Radius when view is active |
textViewDisableBgColor | Color | Background Color when view is inactive |
textViewDisableBorder | Dimension | Background Border when view is inactive |
textViewDisableBorderColor | Color | Background Border Color when view is inactive |
textViewDisableCorner | Dimension | Background Corner Radius when view is inactive |
textViewTextStyle | Reference | TextStyle when view is active |
textViewDisableTextStyle | Reference | TextStyle when view is inactive |
- textViewTxtColor μ textViewTextStyle κ°μ΄ μ¬μ©ν μ μμ΅λλ€. μ¬μ©νλλΌλ textStyle μ μ°μ μμλ‘ μ²λ¦¬ν©λλ€. (TextViewTxtColor and textViewTextStyle cannot be used together. Use to treat textStyle as a priority.)
- xml
<hmju.widget.view.CustomTextView
android:id="@+id/tvSample"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:text="this is Sample TextView"
app:textViewBgColor="#601F1F"
app:textViewBorder="3dp"
app:textViewBorderColor="#FFFFFF"
app:textViewCorner="12dp"
app:textViewDefState="true"
app:textViewDisableBgColor="#FFC107"
app:textViewDisableBorder="2dp"
app:textViewDisableBorderColor="#00BCD4"
app:textViewDisableCorner="25dp"
app:textViewDisableTextStyle="@style/SampleText.Medium"
app:textViewTextStyle="@style/SampleText.Bold" />