Skip to content

Commit 32f0915

Browse files
committed
Update README.md
1 parent 183a10c commit 32f0915

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

README.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ Then select library folder from project. And start use. </p>
1010
<h3> XML tag's </h3>
1111

1212
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+
```
1920
<p> You can specify the following things:<br>
2021
cb_background - background color of normal button {format - color} - recommended <br>
2122
cb_background_pressed - background color of pressed button {format - color} <br>
@@ -56,21 +57,23 @@ cb_image_padding_bottom - {format - dimension} <br>
5657
cb_image_scale_type - {center, center_inside, center_crop, fit_center, fit_start, fit_end, fit_xy} <br>
5758
cb_image_weight - {format - integer} </p>
5859
<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)
7274
setImage(int position, Drawable drawable, ImageView.ScaleType scaleType, int weight, int[] padding)<br>
73-
setElevationEnabled(boolean enabled) <br>
75+
setElevationEnabled(boolean enabled)
7476
and evry XML tag have getter
77+
```
7578
<h3> Static field </h3>
7679
LEFT, TOP, RIGHT, BOTTOM

0 commit comments

Comments
 (0)