-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from binayshaw7777/develop
Added Shape Customization
- Loading branch information
Showing
10 changed files
with
158 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
app/src/main/java/com/binayshaw7777/kotstep/utils/StepperItemShape.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.binayshaw7777.kotstep.utils | ||
|
||
import androidx.compose.foundation.shape.CircleShape | ||
import androidx.compose.foundation.shape.CutCornerShape | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.ui.graphics.RectangleShape | ||
import androidx.compose.ui.graphics.Shape | ||
|
||
enum class StepperItemShape { | ||
RECTANGLE_SHAPE, | ||
CIRCLE_SHAPE, | ||
ROUNDED_CORNER_SHAPE, | ||
CUT_CORNER_SHAPE; | ||
|
||
companion object { | ||
fun getShapeFromEnum(shape: StepperItemShape): Shape { | ||
return when (shape) { | ||
RECTANGLE_SHAPE -> { | ||
RectangleShape | ||
} | ||
|
||
CIRCLE_SHAPE -> { | ||
CircleShape | ||
} | ||
|
||
ROUNDED_CORNER_SHAPE -> { | ||
RoundedCornerShape(20) | ||
} | ||
|
||
CUT_CORNER_SHAPE -> { | ||
CutCornerShape(20) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.