Skip to content

Commit bedf115

Browse files
Update README.md
1 parent a5a65fe commit bedf115

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ allprojects {
5656
```
5757

5858
Now, include the following dependency in your App-level Gradle Build file:
59-
#### Note: Current latest version is **1.5.1**.
59+
> [!NOTE]
60+
> Current latest version is **1.5.1**
61+
6062
**Gradle Groovy DSL (If you have build.gradle file):**
6163
```groovy
6264
dependencies {
@@ -96,8 +98,13 @@ import com.techiness.progressdialoglibrary.ProgressDialog;
9698
## Various Constructors available
9799

98100
### Simple Constructor
99-
#### Uses Light Theme by Default. Note: Theme can be changed after Instantiation using setTheme(int themeConstant) method.
100-
**IMPORTANT** : If you want to Instantiate ```ProgressDialog``` Class in a **Fragment**, use ```requireContext()``` method instead of ```this``` keyword for passing ```Context``` object. Similarly, for Instantiating ```ProgressDialog``` Class in **Inner Classes**, use ```YourActivity.this``` in **Java** or ```this@YourActivity``` in **Kotlin** instead of simple ```this``` keyword for passing ```Context``` object.
101+
#### Uses Light Theme by Default.
102+
> [!NOTE]
103+
> Theme can be changed after Instantiation using setTheme(int themeConstant) method.
104+
105+
> [!IMPORTANT]
106+
> If you want to Instantiate ```ProgressDialog``` Class in a **Fragment**, use ```requireContext()``` method instead of ```this``` keyword for passing ```Context``` object. Similarly, for Instantiating ```ProgressDialog``` Class in **Inner Classes**, use ```YourActivity.this``` in **Java** or ```this@YourActivity``` in **Kotlin** instead of simple ```this``` keyword for passing ```Context``` object.
107+
101108
#### Java Code:
102109
```java
103110
ProgressDialog progressDialog = new ProgressDialog(this); //same as new ProgressDialog(this, ProgressDialog.THEME_LIGHT);
@@ -119,7 +126,9 @@ val progressDialog = ProgressDialog(this, ProgressDialog.THEME_DARK)
119126
```
120127

121128
### Constructor for Alternate Mode
122-
#### Default mode is Indeterminate mode. Note: Mode can be changed as and when necessary using in-built methods.
129+
#### Default mode is Indeterminate mode.
130+
> [!NOTE]
131+
> Mode can be changed as and when necessary using in-built methods.
123132
#### Java Code:
124133
```java
125134
ProgressDialog progressDialog = new ProgressDialog(ProgressDialog.MODE_DETERMINATE,this); // for instantiating with Determinate mode
@@ -415,7 +424,9 @@ with(progressDialog)
415424
<img src="./output/deter_title_dark.jpg" width=26% height=26%>
416425

417426
### Indeterminate ProgressDialog with NegativeButton and Custom OnClickListener for NegativeButton (Light Theme)
418-
##### Note: Enabling NegativeButton will automatically enable TitleView.
427+
> [!NOTE]
428+
> Enabling NegativeButton will automatically enable TitleView.
429+
419430
#### Java Code:
420431
```java
421432
progressDialog.setTheme(ProgressDialog.THEME_LIGHT);
@@ -443,7 +454,9 @@ with(progressDialog)
443454
<img src="./output/indeter_with_negativebtn.jpg" width=26% height=26%>
444455

445456
### Indeterminate ProgressDialog with NegativeButton and Custom OnClickListener for NegativeButton (Dark Theme)
446-
##### Note: Enabling NegativeButton will automatically enable TitleView.
457+
> [!NOTE]
458+
> Enabling NegativeButton will automatically enable TitleView.
459+
447460
#### Java Code:
448461
```java
449462
progressDialog.setTheme(ProgressDialog.THEME_DARK);
@@ -471,7 +484,9 @@ with(progressDialog)
471484
<img src="./output/indeter_with_negativebtn_dark.jpg" width=26% height=26%>
472485

473486
### Determinate ProgressDialog with NegativeButton and Default OnClickListener for NegativeButton (Light Theme)
474-
##### Note: Enabling NegativeButton will automatically enable TitleView.
487+
> [!NOTE]
488+
> Enabling NegativeButton will automatically enable TitleView.
489+
475490
#### Java Code:
476491
```java
477492
progressDialog.setTheme(ProgressDialog.THEME_LIGHT);

0 commit comments

Comments
 (0)