@@ -10,12 +10,13 @@ Then select library folder from project. And start use. </p>
10
10
<h3 > XML tag's </h3 >
11
11
12
12
This is the base tag of CustomButton:<br >
13
- \< pl.sigmapoint.customview.CustomButton<br >
14
- &emsp ;&emsp ; android: id ="@+id/sigmapoint_button"<br >
15
- &emsp ;&emsp ; android: layout_width ="match_parent"<br >
16
- &emsp ;&emsp ; android: layout_height ="match_parent"<br >
17
- &emsp ;&emsp ; android: text ="text"/><br >
18
- </br >
13
+ ``` xml
14
+ <pl .sigmapoint.customview.CustomButton<br>
15
+ android:id="@+id/sigmapoint_button"
16
+ android:layout_width="match_parent"
17
+ android:layout_height="match_parent"
18
+ android:text="text"/>
19
+ ```
19
20
<p > You can specify the following things:<br >
20
21
cb_background - background color of normal button {format - color} - recommended <br >
21
22
cb_background_pressed - background color of pressed button {format - color} <br >
@@ -56,21 +57,23 @@ cb_image_padding_bottom - {format - dimension} <br>
56
57
cb_image_scale_type - {center, center_inside, center_crop, fit_center, fit_start, fit_end, fit_xy} <br >
57
58
cb_image_weight - {format - integer} </p >
58
59
<h3 > Java Code </h3 >
59
- setShapeBackground(int shapeType, int shapeRadius) <br >
60
- setBackgroundColorStateList(ColorStateList colorStateList) <br >
61
- setFrame(int color, float size) <br >
62
- setFrame(ColorStateList colorStateList, float size) <br >
63
- setFrameSize(float frameSize) <br >
64
- removeFrame() <br >
65
- setTextColor(int color) <br >
66
- setTextColor(ColorStateList colorStateList) <br >
67
- setText(String text) <br >
68
- setTextSize(float size) <br >
69
- setTextPadding(int[ ] padding) - int[ 4] {CustomButton.LEFT, CustomButton.TOP, CustomButton.RIGHT, CustomButton.BOTTOM} <br >
70
- setTextParams(int weight, int[ ] padding) <br >
71
- setImage(int position, Drawable drawableNormal, Drawable drawablePressed, Drawable drawableDisabled, ImageView.ScaleType scaleType, int weight, int[ ] padding) <br >
60
+ ``` java
61
+ setShapeBackground(int shapeType, int shapeRadius)
62
+ setBackgroundColorStateList(ColorStateList colorStateList)
63
+ setFrame(int color, float size)
64
+ setFrame(ColorStateList colorStateList, float size)
65
+ setFrameSize(float frameSize)
66
+ removeFrame()
67
+ setTextColor(int color)
68
+ setTextColor(ColorStateList colorStateList)
69
+ setText(String text)
70
+ setTextSize(float size)
71
+ setTextPadding(int [] padding) - int [4 ]{CustomButton . LEFT , CustomButton . TOP , CustomButton . RIGHT , CustomButton . BOTTOM }
72
+ setTextParams(int weight, int [] padding)
73
+ setImage(int position, Drawable drawableNormal, Drawable drawablePressed, Drawable drawableDisabled, ImageView . ScaleType scaleType, int weight, int [] padding)
72
74
setImage(int position, Drawable drawable, ImageView . ScaleType scaleType, int weight, int [] padding)< br>
73
- setElevationEnabled(boolean enabled) < br >
75
+ setElevationEnabled(boolean enabled)
74
76
and evry XML tag have getter
77
+ ```
75
78
<h3 > Static field </h3 >
76
79
LEFT, TOP, RIGHT, BOTTOM
0 commit comments