Display fresco image on demand (#5160)

Summary:
[android][sample] Display fresco image on demand

Pull Request resolved: https://github.com/facebook/flipper/pull/5160

Reviewed By: antonk52

Differential Revision: D49411927

Pulled By: passy

fbshipit-source-id: 05d83d49df56f1e7eced2ce35d29880c9876b524
This commit is contained in:
Pascal Hartig
2023-09-20 03:55:40 -07:00
committed by Facebook GitHub Bot
parent 1163769b83
commit b808c4f9df

View File

@@ -125,11 +125,13 @@ public class RootComponentSpec {
.textSizeSp(20) .textSizeSp(20)
.clickHandler(RootComponent.triggerCrash(c))) .clickHandler(RootComponent.triggerCrash(c)))
.child( .child(
FrescoVitoImage2.create(c) displayImage
? FrescoVitoImage2.create(c)
.uri(Uri.parse("https://fbflipper.com/img/icon.png")) .uri(Uri.parse("https://fbflipper.com/img/icon.png"))
.marginDip(YogaEdge.ALL, 10) .marginDip(YogaEdge.ALL, 10)
.widthDip(150) .widthDip(150)
.heightDip(150)) .heightDip(150)
: null)
.build(); .build();
return VerticalScroll.create(c).childComponent(col).build(); return VerticalScroll.create(c).childComponent(col).build();