Fixed
Status Update
Comments
so...@google.com <so...@google.com> #2
I proposed this which I think it is better than the actual behavior, and could let the developers work with more room to be creative.
https://code.google.com/p/android/issues/detail?id=58318
so...@google.com <so...@google.com> #3
The presentation link doesn't work.
[Deleted User] <[Deleted User]> #4
In Custom Notification Layouts section of the Notification API Guides, it states: "The height available for a custom notification layout depends on the notification view. Normal view layouts are limited to 64 dp, and expanded view layouts are limited to 256 dp". I guess it means the width is 512 dp and the height is 256 dp (if following the 2:1 aspect ratio)?
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomNotification
si...@google.com <si...@google.com> #7
Any update on this?
[Deleted User] <[Deleted User]> #8
Thank you for your feedback. We assure you that we are doing our best to address all issues reported. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with the bug report here https://goo.gl/TbMiIO and reference this bug for context.
si...@google.com <si...@google.com> #9
looks like this is related to the custom font family that is used.
the cause is the same for this ticket and
will dup.
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit dee3aeccfd05c61444835ba9a8c9977608ca8ca6
Author: siyamed <siyamed@google.com>
Date: Wed Jul 27 10:38:25 2022
Prevent text cut for singleLine TextField
When maxLines is defined on TextField, the height is
calculated based on a constant height.
When maxLines is 1 (and softwrap is false), and a
character with greater height is entered, this causes
the taller glyph to be cut.
When maxLines is not 1, and softwrap is true, this
does not cause a problem since it is possible to scroll
the TextField.
This CL updates the height constraints based on text
entered for maxLines modifier when maxLines = 1.
RelNote: N/A
Test: TBD
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 228512135
Change-Id: I7c2df57d26e9f7bd1a01a4c37883627b8ef7c86a
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemoMetrics.kt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextDelegate.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeLineHeight.kt
https://android-review.googlesource.com/2167544
Branch: androidx-main
commit dee3aeccfd05c61444835ba9a8c9977608ca8ca6
Author: siyamed <siyamed@google.com>
Date: Wed Jul 27 10:38:25 2022
Prevent text cut for singleLine TextField
When maxLines is defined on TextField, the height is
calculated based on a constant height.
When maxLines is 1 (and softwrap is false), and a
character with greater height is entered, this causes
the taller glyph to be cut.
When maxLines is not 1, and softwrap is true, this
does not cause a problem since it is possible to scroll
the TextField.
This CL updates the height constraints based on text
entered for maxLines modifier when maxLines = 1.
RelNote: N/A
Test: TBD
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 228512135
Change-Id: I7c2df57d26e9f7bd1a01a4c37883627b8ef7c86a
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemoMetrics.kt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextDelegate.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeLineHeight.kt
Description
- Jetpack Compose component used: TextField
- Android Studio Build: Chipmunk | 2021.2.1 Canary 2
- Kotlin version: 1.6.10
- Devices/Android versions reproduced on: Pixel 6 Pro
- Keyboard (i.e. Gboard, Samsung, etc): Gboard
Slack thread:
Usage:
TextField(
modifier = Modifier
.wrapContentHeight(Alignment.CenterVertically)
.padding(horizontal = 20.dp),
value = text,
shape = RoundedCornerShape(4.dp),
onValueChange = {
text = it.take(allowedCharacterCount + addAllowedChar)
if (it.length > allowedCharacterCount + addAllowedChar) {
focusManager.moveFocus(FocusDirection.Down)
}
},
trailingIcon = {
val indicatorColor =
if (text.length == allowedCharacterCount) Color(0xFFDB001B) else OKTheme.colors.textColors.dark900
Text(
text = (allowedCharacterCount - text.length).toString(),
color = indicatorColor,
modifier = Modifier
.background(OKTheme.colors.uiColors.dark300)
)
},
singleLine = true,
textStyle = OKTheme.typography.textEditField.copy(color = OKTheme.colors.textColors.dark900),
colors = TextFieldDefaults.textFieldColors(
textColor = OKTheme.colors.textColors.dark900,
backgroundColor = OKTheme.colors.uiColors.dark300,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
cursorColor = Color.Black
)
)