Skip to content

Commit da5d392

Browse files
committed
setBackgroundAlpha method added. Then you can change the textView background opacity
2 parents 10a649c + 6d6a015 commit da5d392

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![](https://jitpack.io/v/qarakenbacho/WaterTextView.svg)](https://jitpack.io/#qarakenbacho/WaterTextView)
12
# WaterTextView
23
**Step 1.** Add the JitPack repository to your build file
34
Add it in your root build.gradle at the end of repositories:
@@ -15,8 +16,41 @@ dependencies {
1516
implementation 'com.github.qarakenbacho:WaterTextView:1.0'
1617
}
1718
```
18-
19-
20-
21-
22-
[![](https://jitpack.io/v/qarakenbacho/WaterTextView.svg)](https://jitpack.io/#qarakenbacho/WaterTextView)
19+
**Usage**
20+
**activity_main.xml**
21+
```
22+
<RelativeLayout
23+
xmlns:android="http://schemas.android.com/apk/res/android"
24+
xmlns:tools="http://schemas.android.com/tools"
25+
android:layout_width="match_parent"
26+
android:layout_height="match_parent"
27+
android:padding="20dp"
28+
tools:context=".MainActivity">
29+
30+
<!--This is a basic part. layout width must be match_parent-->
31+
<uz.sadirbaev.waterbackground.WaterTextView
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:textSize="30sp"
35+
android:id="@+id/tv30"
36+
android:layout_marginBottom="20dp"/>
37+
38+
</RelativeLayout>
39+
```
40+
**MainActivity.class**
41+
```
42+
@Override
43+
protected void onCreate(Bundle savedInstanceState) {
44+
super.onCreate(savedInstanceState);
45+
setContentView(R.layout.activity_main);
46+
WaterTextView textView = findViewById(R.id.tv30);
47+
String s = "Welcome to Water Background.";
48+
textView.setText(s);
49+
}
50+
```
51+
<p align="center">
52+
<img src="https://github.com/qarakenbacho/WaterTextView/blob/master/screenshots/photo_2018-05-14_19-52-21.jpg" width="200"/>
53+
</p>
54+
55+
56+

0 commit comments

Comments
 (0)