Home
last modified time | relevance | path

Searched refs:dp (Results 1 – 25 of 123) sorted by relevance

12345

/aosp14/frameworks/base/packages/SystemUI/compose/core/tests/src/com/android/compose/animation/scene/transformation/
H A DEdgeTranslateTest.kt28 import androidx.compose.ui.unit.dp
71 at(32) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 0.dp) }
72 at(64) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 100.dp) }
73 after { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 100.dp) }
81 at(0) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 0.dp) }
82 at(32) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 50.dp) }
84 after { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 100.dp) }
92 at(0) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 300.dp) }
95 after { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(100.dp, 100.dp) }
115 at(32) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(0.dp, 100.dp) }
[all …]
H A DAnchoredTranslateTest.kt26 import androidx.compose.ui.unit.dp
42 Box(Modifier.offset(10.dp, 50.dp).element(TestElements.Foo))
43 Box(Modifier.offset(20.dp, 40.dp).element(TestElements.Bar))
45 toSceneContent = { Box(Modifier.offset(30.dp, 10.dp).element(TestElements.Foo)) },
53 before { onElement(TestElements.Bar).assertPositionInRootIsEqualTo(20.dp, 40.dp) }
54 at(0) { onElement(TestElements.Bar).assertPositionInRootIsEqualTo(20.dp, 40.dp) }
55 at(16) { onElement(TestElements.Bar).assertPositionInRootIsEqualTo(25.dp, 30.dp) }
56 at(32) { onElement(TestElements.Bar).assertPositionInRootIsEqualTo(30.dp, 20.dp) }
67 Box(Modifier.offset(30.dp, 10.dp).element(TestElements.Foo))
68 Box(Modifier.offset(20.dp, 40.dp).element(TestElements.Bar))
[all …]
H A DAnchoredSizeTest.kt43 Box(Modifier.size(50.dp, 50.dp).element(TestElements.Foo))
44 Box(Modifier.size(200.dp, 60.dp).element(TestElements.Bar))
55 at(0) { onElement(TestElements.Bar).assertSizeIsEqualTo(100.dp, 100.dp) }
56 at(16) { onElement(TestElements.Bar).assertSizeIsEqualTo(125.dp, 90.dp) }
57 at(32) { onElement(TestElements.Bar).assertSizeIsEqualTo(150.dp, 80.dp) }
58 at(48) { onElement(TestElements.Bar).assertSizeIsEqualTo(175.dp, 70.dp) }
59 at(64) { onElement(TestElements.Bar).assertSizeIsEqualTo(200.dp, 60.dp) }
60 after { onElement(TestElements.Bar).assertSizeIsEqualTo(200.dp, 60.dp) }
68 Box(Modifier.size(100.dp, 100.dp).element(TestElements.Foo))
69 Box(Modifier.size(100.dp, 100.dp).element(TestElements.Bar))
[all …]
H A DTranslateTest.kt26 import androidx.compose.ui.unit.dp
43 Box(Modifier.offset(10.dp, 50.dp).element(TestElements.Foo))
49 translate(TestElements.Foo, x = 20.dp, y = (-40).dp)
52 before { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(10.dp, 50.dp) }
53 at(0) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(10.dp, 50.dp) }
54 at(16) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(15.dp, 40.dp) }
55 at(32) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(20.dp, 30.dp) }
56 at(48) { onElement(TestElements.Foo).assertPositionInRootIsEqualTo(25.dp, 20.dp) }
67 Box(Modifier.offset(10.dp, 50.dp).element(TestElements.Foo))
72 translate(TestElements.Foo, x = 20.dp, y = (-40).dp)
[all …]
H A DScaleSizeTest.kt25 import androidx.compose.ui.unit.dp
42 toSceneContent = { Box(Modifier.size(100.dp).element(TestElements.Foo)) },
52 at(0) { onElement(TestElements.Foo).assertSizeIsEqualTo(200.dp, 50.dp) }
53 at(16) { onElement(TestElements.Foo).assertSizeIsEqualTo(175.dp, 62.5.dp) }
54 at(32) { onElement(TestElements.Foo).assertSizeIsEqualTo(150.dp, 75.dp) }
55 at(48) { onElement(TestElements.Foo).assertSizeIsEqualTo(125.dp, 87.5.dp) }
56 at(64) { onElement(TestElements.Foo).assertSizeIsEqualTo(100.dp, 100.dp) }
57 after { onElement(TestElements.Foo).assertSizeIsEqualTo(100.dp, 100.dp) }
/aosp14/frameworks/base/packages/CredentialManager/src/com/android/credentialmanager/ui/theme/
H A DShape.kt5 import androidx.compose.ui.unit.dp
8 small = RoundedCornerShape(100.dp),
9 medium = RoundedCornerShape(28.dp),
10 large = RoundedCornerShape(0.dp)
14 val TopRoundedCorner = RoundedCornerShape(28.dp, 28.dp, 0.dp, 0.dp)
15 val BottomRoundedCorner = RoundedCornerShape(0.dp, 0.dp, 28.dp, 28.dp)
17 val FullSmallRoundedCorner = RoundedCornerShape(4.dp, 4.dp, 4.dp, 4.dp)
19 val FullMediumRoundedCorner = RoundedCornerShape(28.dp, 28.dp, 28.dp, 28.dp)
/aosp14/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/
H A DSettingsDimension.kt20 import androidx.compose.ui.unit.dp
23 val itemIconSize = 24.dp
24 val itemIconContainerSize = 72.dp
25 val itemPaddingStart = 24.dp
26 val itemPaddingEnd = 16.dp
27 val itemPaddingVertical = 16.dp
34 val itemPaddingAround = 8.dp
35 val itemDividerHeight = 32.dp
38 val appIconItemSize = 32.dp
41 val appIconInfoSize = 48.dp
[all …]
/aosp14/frameworks/base/libs/hwui/tests/common/scenes/
H A DPathClippingAnimation.cpp103 return new PathClippingAnimation(dp(100), dp(80), false, false); in __anona4ae96ea0202()
109 return new PathClippingAnimation(dp(100), dp(80), false, false, 1); in __anona4ae96ea0302()
115 return new PathClippingAnimation(dp(100), dp(350), false, false, 1); in __anona4ae96ea0402()
121 return new PathClippingAnimation(dp(100), dp(80), true, false); in __anona4ae96ea0502()
127 return new PathClippingAnimation(dp(100), dp(80), true, false, 1); in __anona4ae96ea0602()
133 return new PathClippingAnimation(dp(100), dp(350), true, false, 1); in __anona4ae96ea0702()
140 return new PathClippingAnimation(dp(100), dp(80), true, true); in __anona4ae96ea0802()
147 return new PathClippingAnimation(dp(100), dp(80), true, true, 1); in __anona4ae96ea0902()
154 return new PathClippingAnimation(dp(100), dp(350), true, true, 1); in __anona4ae96ea0a02()
H A DShadowGrid2Animation.cpp36 for (int x = dp(8); x < (width - dp(58)); x += dp(58)) { in createContent()
37 for (int y = dp(8); y < (height - dp(58)); y += dp(58)) { in createContent()
38 sp<RenderNode> card = createCard(x, y, dp(50), dp(50)); in createContent()
59 props.setElevation(dp(16)); in createCard()
61 dp(6), 1); in createCard()
H A DShadowGridAnimation.cpp36 for (int x = dp(16); x < (width - dp(116)); x += dp(116)) { in createContent()
37 for (int y = dp(16); y < (height - dp(116)); y += dp(116)) { in createContent()
38 sp<RenderNode> card = createCard(x, y, dp(100), dp(100)); in createContent()
59 props.setElevation(dp(16)); in createCard()
61 dp(6), 1); in createCard()
H A DListViewAnimation.cpp44 int size = cardHeight - (dp(10) * 2); in createRandomCharIcon()
70 int size = dp(20); in createBoxBitmap()
71 int stroke = dp(2); in createBoxBitmap()
94 canvas.drawRoundRect(0, 0, itemWidth, itemHeight, dp(6), dp(6), roundRectPaint); in createListItem()
98 textPaint.getSkFont().setSize(dp(20)); in createListItem()
102 TestUtils::drawUtf8ToCanvas(&canvas, buf, textPaint, itemHeight, dp(25)); in createListItem()
103 textPaint.getSkFont().setSize(dp(15)); in createListItem()
105 itemHeight, dp(45)); in createListItem()
108 canvas.drawBitmap(*randomIcon, dp(10), dp(10), nullptr); in createListItem()
111 canvas.drawBitmap(*box, itemWidth - dp(10) - box->width(), dp(10), nullptr); in createListItem()
H A DPartialDamageAnimation.cpp40 for (int x = dp(16); x < (width - dp(116)); x += dp(116)) { in createContent()
41 for (int y = dp(16); y < (height - dp(116)); y += dp(116)) { in createContent()
42 SkColor color = COLORS[static_cast<int>((y / dp(116))) % 4]; in createContent()
44 TestUtils::createNode(x, y, x + dp(100), y + dp(100), in createContent()
H A DRoundRectClippingAnimation.cpp77 return new RoundRectClippingAnimation(dp(40), dp(200)); in __anon1b11fb930202()
84 return new RoundRectClippingAnimation(dp(20), dp(20)); in __anon1b11fb930302()
90 return new RoundRectClippingAnimation(dp(100), dp(80)); in __anon1b11fb930402()
96 return new RoundRectClippingAnimation(dp(100), dp(80), 1); in __anon1b11fb930502()
103 return new RoundRectClippingAnimation(dp(100), dp(350), 1); in __anon1b11fb930602()
H A DStretchyListViewAnimation.cpp89 int size = cardHeight - (dp(10) * 2); in createRandomCharIcon()
115 int size = dp(20); in createBoxBitmap()
116 int stroke = dp(2); in createBoxBitmap()
144 canvas.drawRoundRect(0, 0, itemWidth, itemHeight, dp(6), dp(6), roundRectPaint); in createListItem()
148 textPaint.getSkFont().setSize(dp(20)); in createListItem()
153 textPaint.getSkFont().setSize(dp(15)); in createListItem()
156 dp(45)); in createListItem()
163 canvas.drawBitmap(*randomIcon, dp(10), dp(10), nullptr); in createListItem()
166 canvas.drawBitmap(*box, itemWidth - dp(10) - box->width(), dp(10), nullptr); in createListItem()
171 mItemHeight = dp(60); in createContent()
[all …]
H A DTvApp.cpp76 mSingleBitmap = mAllocator(dp(160), dp(120), kRGBA_8888_SkColorType, in createContent()
79 for (int y = dp(18) - dp(178); y < height - dp(18); y += dp(178)) { in createContent()
81 for (int x = dp(18); x < width - dp(18); x += dp(178)) { in createContent()
82 sp<RenderNode> card = createCard(x, y, dp(160), dp(160), isFirstCard); in createContent()
147 virtual float roundedCornerRadius() { return dp(2); } in roundedCornerRadius()
157 props.setElevation(dp(16)); in createCard()
166 : mAllocator(width, dp(120), kRGBA_8888_SkColorType, in createCard()
171 sp<RenderNode> cardImage = createSharedBitmapNode(canvas, 0, 0, width, dp(120), bitmap); in createCard()
182 createInfoNode(canvas, 0, dp(120), width, height, buffer, buffer2); in createCard()
244 virtual float roundedCornerRadius() override { return dp(0); } in roundedCornerRadius()
[all …]
/aosp14/frameworks/base/packages/SystemUI/compose/core/tests/src/com/android/compose/animation/scene/
H A DSceneTransitionLayoutTest.kt49 import androidx.compose.ui.unit.dp
86 SharedFoo(size = 50.dp, childOffset = 0.dp, Modifier.align(Alignment.TopEnd))
93 size = 100.dp,
130 .size(30.dp)
231 expectedTop = 0.dp,
236 assertThat(sharedFoo.onChild().offsetRelativeTo(sharedFoo)).isEqualTo(DpOffset(0.dp, 0.dp))
264 expectedTop = 0.dp,
272 .of(DpOffset(25.dp, 25.dp))
284 val expectedLeft = 0.dp
285 val expectedSize = 100.dp + (150.dp - 100.dp) * interpolatedProgress
[all …]
H A DSwipeToSceneTest.kt35 import androidx.compose.ui.unit.dp
45 private val LayoutWidth = 200.dp
46 private val LayoutHeight = 400.dp
124 assertThat(transition.progress).isEqualTo(55.dp / LayoutWidth)
135 assertThat(transition.progress).isEqualTo(55.dp / LayoutWidth)
156 assertThat(transition.progress).isEqualTo(56.dp / LayoutHeight)
195 end = middle - Offset(55.dp.toPx() + touchSlop, 0f),
196 endVelocity = 124.dp.toPx(),
208 assertThat(transition.progress).isEqualTo(55.dp / LayoutWidth)
222 end = middle + Offset(0f, 55.dp.toPx() + touchSlop),
[all …]
/aosp14/frameworks/base/packages/CredentialManager/src/com/android/credentialmanager/common/ui/
H A DEntry.kt58 import androidx.compose.ui.unit.dp
88 start = 8.dp, top = 16.dp, bottom = 16.dp
90 val iconSize = Modifier.size(24.dp)
101 horizontal = 8.dp, vertical = 16.dp,
137 modifier = Modifier.padding(start = 12.dp).size(24.dp),
170 modifier = Modifier.size(24.dp),
256 .padding(start = 16.dp, top = 16.dp, bottom = 16.dp)) {
266 modifier = Modifier.size(24.dp),
295 modifier = Modifier.size(24.dp),
343 modifier = Modifier.padding(top = 8.dp, bottom = 8.dp, start = 4.dp).size(48.dp),
[all …]
H A DConfirmButton.kt26 import androidx.compose.ui.unit.dp
32 modifier = Modifier.padding(vertical = 4.dp),
38 contentPadding = PaddingValues(start = 24.dp, top = 10.dp, end = 24.dp, bottom = 10.dp),
H A DSnackBar.kt39 import androidx.compose.ui.unit.dp
65 .align(Alignment.BottomCenter).wrapContentSize().padding(bottom = 18.dp)
79 top = 18.dp, bottom = 18.dp, start = 24.dp,
85 top = 4.dp, bottom = 4.dp, start = 2.dp, end = 10.dp,
/aosp14/frameworks/base/packages/SystemUI/compose/features/src/com/android/systemui/people/ui/compose/
H A DPeopleScreen.kt48 import androidx.compose.ui.unit.dp
115 Spacer(Modifier.height(24.dp))
119 Modifier.padding(horizontal = 24.dp),
130 top = 16.dp,
132 start = 8.dp,
133 end = 8.dp,
143 Spacer(Modifier.height(35.dp))
160 Modifier.padding(start = 16.dp),
165 Spacer(Modifier.height(10.dp))
171 thickness = 2.dp,
[all …]
H A DPeopleScreenEmpty.kt43 import androidx.compose.ui.unit.dp
61 Spacer(Modifier.height(50.dp))
76 Modifier.fillMaxWidth().defaultMinSize(minHeight = 56.dp),
92 shape = RoundedCornerShape(28.dp),
97 Modifier.padding(vertical = 20.dp, horizontal = 16.dp),
105 Modifier.size(40.dp),
107 Spacer(Modifier.height(2.dp))
116 Spacer(Modifier.width(24.dp))
/aosp14/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/
H A DPlatformButtons.kt29 import androidx.compose.ui.unit.dp
40 modifier = modifier.padding(vertical = 6.dp).height(36.dp),
58 modifier = modifier.padding(vertical = 6.dp).height(36.dp),
84 private val ButtonPaddings = PaddingValues(horizontal = 16.dp, vertical = 8.dp)
107 width = 1.dp,
/aosp14/frameworks/base/tests/SilkFX/src/com/android/test/silkfx/hdr/
H A DGlowingCard.kt37 radius = 10.dp()
60 paint.strokeWidth = 4.dp()
69 rect.inset(3.dp(), 3.dp())
76 rect.inset(5.dp(), 5.dp())
77 paint.textSize = 14.dp()
/aosp14/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/compose/
H A DPaddingValuesExt.kt22 import androidx.compose.ui.unit.dp
32 override fun calculateTopPadding(): Dp = 0.dp
37 override fun calculateBottomPadding() = 0.dp
41 override fun calculateLeftPadding(layoutDirection: LayoutDirection) = 0.dp
45 override fun calculateRightPadding(layoutDirection: LayoutDirection) = 0.dp

12345