Skip to content

Commit fadc106

Browse files
Merge pull request #31 from SimformSolutionsPvtLtd/develop
Develop
2 parents 4be3eaa + c107d9c commit fadc106

File tree

11 files changed

+108
-66
lines changed

11 files changed

+108
-66
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![alt text](https://github.com/SimformSolutionsPvtLtd/SSJetPackComposeProgressButton/blob/main/gif/banner.png)
2+
13
# SSJetPackComposeProgressButton
24
### _SSJetPackComposeProgressButton is an elegant button with a different loading animations which makes your app attractive._
35

@@ -7,7 +9,7 @@
79
Jetpack Compose is Android’s modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs.
810

911
## How to get started
10-
Please get **Android Studio Arctic Fox 2020.3.1 Canary 4** or above [from here](https://developer.android.com/studio/preview/) and use **JDK 11** to build this project.
12+
Please get **Android Studio Arctic Fox 2020.3.1** or above [from here](https://developer.android.com/studio) and use **JDK 11** to build this project.
1113

1214
## Features
1315
- Android’s modern toolkit - Jetpack Compose support.
@@ -141,6 +143,8 @@ Please get **Android Studio Arctic Fox 2020.3.1 Canary 4** or above [from here](
141143
| `rightImagePainter` | Painter to draw inside this right Icon. | `null` |
142144
| `successIconPainter` | Painter to draw inside this success state Icon. | `rememberVectorPainter(image = Icons.Default.Done)` |
143145
| `failureIconPainter` | Painter to draw inside this failiure state Icon. | `rememberVectorPainter(image = Icons.Outlined.Info)` |
146+
| `successIconColor` | Color to be applied to success icon. | assetColor |
147+
| `failureIconColor` | Color to be applied to failure icon. | assetColor |
144148
| `text` | The text to be displayed. | `null` |
145149
| `textModifier` | To apply to this text layout node. | `Modifier` |
146150
| `fontSize` | The size of glyphs to use when painting the text. | `TextUnit.Unspecified` |

app/src/main/java/com/simform/ssjetpackcomposeprogressbutton/MainActivity.kt

Lines changed: 83 additions & 55 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
package com.simform.ssjetpackcomposeprogressbutton.utils
22

33

4-
const val COMMON_WIDTH = 370
5-
const val COMMON_HEIGHT = 50
6-
const val oneFloat = 1f
7-
const val forty = 40
8-
const val zero = 0
9-
const val two = 2
10-
const val six = 6
4+
const val COMMON_WIDTH = 480
5+
const val COMMON_HEIGHT = 60
6+
const val TOP_BUTTON_HEIGHT = 50
7+
const val TOP_BUTTON_RADIUS = 10
8+
const val COMMON_BORDER_WIDTH = 3
9+
const val COMMON_CORNER_RADIUS = 25
10+
const val FONT_SIZE = 20
11+
const val ONE_FLOAT = 1f
12+
const val FORTY = 40
13+
const val ZERO = 0
14+
const val TWO = 2
15+
const val TWELVE = 12

app/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
<color name="yellow">#ffbb00</color>
1212
<color name="light_blue">#23395D</color>
1313
<color name="pink">#ff1731</color>
14+
<color name="handColor">#ffffff</color>
1415
</resources>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<string name="app_name">SSLoadingButtonAndroid</string>
33
<string name="right_icon">Right Icon</string>
44
<string name="left_icon">Left Icon</string>
5-
<string name="with_text">With Text</string>
5+
<string name="stylish_text">Stylish Text</string>
66
<string name="on_success">On Success</string>
77
<string name="on_failure">On Failure</string>
88
<string name="simform">SIMFORM</string>

gif/banner.png

154 KB
Loading

gif/custom_fail.gif

65 KB
Loading

gif/custom_success.gif

61 KB
Loading

gif/failure.gif

135 KB
Loading

gif/success.gif

-732 KB
Loading

0 commit comments

Comments
 (0)