This site requires javascript.
Android Code Search
file:androidx/compose/ui/unit/TextUnit.kt symbol:sp
search
close
info_outline
more_vert
Result 1 of 1
content_copy
Search Result Root
androidx/platform/frameworks/support
keyboard_arrow_right
Branch
Branch
androidx-main
keyboard_arrow_right
Search Result Path
compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/
TextUnit.kt
content_copy
Preview
40:
41:
42:
43:
private
const
val
UNIT_MASK =
0xFFL
shl
32
// 0xFF_0000_0000
private
const
val
UNIT_TYPE_UN
SP
ECIFIED =
0x00L
shl
32
// 0x00_0000_0000
private
const
val
UNIT_TYPE_
SP
=
0x01L
shl
32
// 0x01_0000_0000
private
const
val
UNIT_TYPE_EM =
0x02L
shl
32
// 0x02_0000_0000
57:
58:
59:
60:
companion
object
{
val
Un
sp
ecified = TextUnitType(UNIT_TYPE_UNSPECIFIED)
val
Sp
= TextUnitType(UNIT_TYPE_SP)
val
Em = TextUnitType(UNIT_TYPE_EM)
209:
210:
211:
*/
@Stable
val
Un
sp
ecified = pack(UNIT_TYPE_UNSPECIFIED, Float.NaN)
}
226:
227:
228:
/** True if this is a SP unit type. */
val
is
Sp
get
() = rawType == UNIT_TYPE_SP
245:
246:
247:
@Stable
inline
val
TextUnit.is
Sp
ecified: Boolean
get
() = !isUnspecified
261:
262:
263:
@Stable
val
Float.
sp
: TextUnit
get
() = pack(UNIT_TYPE_SP, this)
271:
272:
273:
@Stable
val
Double.
sp
: TextUnit
get
() = pack(UNIT_TYPE_SP, this.toFloat())
281:
282:
283:
@Stable
val
Int.
sp
: TextUnit
get
() = pack(UNIT_TYPE_SP, this.toFloat())
unfold_more
Show 1 more matching line
chevron_left
1
chevron_right
Results per page
10
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Got it
Help
Open branch androidx-main