-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* development: Update readme Add color picker Fix group margins Add stepper param design Add stepper param without final designs Read only param description added to readme Add read only param
- Loading branch information
Showing
42 changed files
with
692 additions
and
63 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
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
3 changes: 3 additions & 0 deletions
3
CockpitCore/src/main/java/com/polidea/cockpit/core/type/CockpitReadOnly.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,3 @@ | ||
package com.polidea.cockpit.core.type | ||
|
||
data class CockpitReadOnly(val text: String = "") |
15 changes: 15 additions & 0 deletions
15
CockpitCore/src/main/java/com/polidea/cockpit/core/type/CockpitStep.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,15 @@ | ||
package com.polidea.cockpit.core.type | ||
|
||
data class CockpitStep<T : Number>(val min: T?, val max: T?, val step: T, val value: T) { | ||
|
||
init { | ||
if (min != null && max != null && min.toDouble() > max.toDouble()) | ||
throw IllegalArgumentException("Max value must be greater than min value") | ||
if (min != null && value.toDouble() < min.toDouble()) | ||
throw IllegalArgumentException("Selected value must be greater than min value") | ||
if (max != null && value.toDouble() > max.toDouble()) | ||
throw IllegalArgumentException("Selected value must be less than max value") | ||
if (step.toDouble() <= 0) | ||
throw IllegalArgumentException("Step value must be positive") | ||
} | ||
} |
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.