demo: add image stretch
This commit is contained in:
parent
79d4eafa5a
commit
92db850cd1
@ -94,7 +94,7 @@ class ImageDemo extends Panel {
|
|||||||
}),
|
}),
|
||||||
label('ImageBase64'),
|
label('ImageBase64'),
|
||||||
image({
|
image({
|
||||||
imageBase64: img_base64,
|
imageBase64: img_base64[0],
|
||||||
width: 300,
|
width: 300,
|
||||||
height: 300,
|
height: 300,
|
||||||
border: {
|
border: {
|
||||||
@ -104,6 +104,27 @@ class ImageDemo extends Panel {
|
|||||||
scaleType: ScaleType.ScaleAspectFill,
|
scaleType: ScaleType.ScaleAspectFill,
|
||||||
layoutConfig: layoutConfig().just(),
|
layoutConfig: layoutConfig().just(),
|
||||||
}),
|
}),
|
||||||
|
label('NinePatch'),
|
||||||
|
image({
|
||||||
|
imageBase64: img_base64[1],
|
||||||
|
height: 60,
|
||||||
|
width: 134,
|
||||||
|
scaleType: ScaleType.ScaleAspectFill,
|
||||||
|
layoutConfig: layoutConfig().just(),
|
||||||
|
}),
|
||||||
|
image({
|
||||||
|
imageBase64: img_base64[1],
|
||||||
|
height: 60,
|
||||||
|
width: 294,
|
||||||
|
scaleType: ScaleType.ScaleToFill,
|
||||||
|
layoutConfig: layoutConfig().just(),
|
||||||
|
stretchInset: {
|
||||||
|
left: 374,
|
||||||
|
top: 0,
|
||||||
|
right: 375,
|
||||||
|
bottom: 198
|
||||||
|
}
|
||||||
|
})
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
layoutConfig: layoutConfig().most().configHeight(LayoutSpec.FIT),
|
layoutConfig: layoutConfig().most().configHeight(LayoutSpec.FIT),
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user