-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [#1564] Send screen redesign (#1601) * [#1564] Send screen redesign Closes #1564 Closes #1580 * [#1564] Test hotfix Closes #1564 Closes #1580 * [#1564] Test hotfix * [#1564] Bugfixes and code cleanup * [#1564] Focus handling * Address Book UI (#1606) * Address Book UI * Design hotfix * Code cleanup * Test hotfix * Confirmation screen redesign (#1602) * Confirmation screen redesign * Documentation update * Design hotfixes * History item redesign (#1603) * History item redesign * Empty Memo message removed * Hidden fee for a receiving transaction * Address Book, Add Contact & Update Contact logic (#1610) * Address Book Screen logic * Add New Contact screen logic * Update Contact screen logic * Code cleanup * Code cleanup
- Loading branch information
1 parent
519b48b
commit 1fedce1
Showing
74 changed files
with
2,580 additions
and
644 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
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
37 changes: 37 additions & 0 deletions
37
ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/component/TextFieldColorsExt.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,37 @@ | ||
package co.electriccoin.zcash.ui.design.component | ||
|
||
import androidx.compose.foundation.interaction.InteractionSource | ||
import androidx.compose.foundation.interaction.collectIsFocusedAsState | ||
import androidx.compose.foundation.text.selection.TextSelectionColors | ||
import androidx.compose.material3.TextFieldColors | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.State | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.rememberUpdatedState | ||
import androidx.compose.ui.graphics.Color | ||
|
||
@Composable | ||
internal fun TextFieldColors.textColor( | ||
enabled: Boolean, | ||
isError: Boolean, | ||
interactionSource: InteractionSource | ||
): State<Color> { | ||
val focused by interactionSource.collectIsFocusedAsState() | ||
|
||
val targetValue = | ||
when { | ||
!enabled -> disabledTextColor | ||
isError -> errorTextColor | ||
focused -> focusedTextColor | ||
else -> unfocusedTextColor | ||
} | ||
return rememberUpdatedState(targetValue) | ||
} | ||
|
||
internal val TextFieldColors.selectionColors: TextSelectionColors | ||
@Composable get() = textSelectionColors | ||
|
||
@Composable | ||
internal fun TextFieldColors.cursorColor(isError: Boolean): State<Color> { | ||
return rememberUpdatedState(if (isError) errorCursorColor else cursorColor) | ||
} |
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.