Skip to content

Conversation

Ombuweb
Copy link
Contributor

@Ombuweb Ombuweb commented Nov 24, 2022

No description provided.

@cla-bot cla-bot bot added the cla: yes label Nov 24, 2022
@Ombuweb Ombuweb marked this pull request as draft November 24, 2022 14:47
@Ombuweb
Copy link
Contributor Author

Ombuweb commented Nov 25, 2022

I need help with examples for ImageSource.fromData() and ImageSource.fromFontIconCodeSync(). I tried

const img = ImageSource.fromFontIconCodeSync("", new Font("serif", 12),new Color("red")) but it's not converting that string to an icon.

@Ombuweb Ombuweb marked this pull request as ready for review November 25, 2022 21:30
@Ombuweb
Copy link
Contributor Author

Ombuweb commented Nov 25, 2022

When is it ideal to use fromAsset() ? It seems to achieve the same result as fromFile() but the latter being simpler.

@rigor789
Copy link
Member

When is it ideal to use fromAsset() ? It seems to achieve the same result as fromFile() but the latter being simpler.

Sometimes you have an ImageAsset instance you need to convert, for example when taking an image with the camera usually results in an ImageAsset, which you convert to ImageSource to display in the app. There are likely other cases where that's useful, but I can't think of any.

@Ombuweb
Copy link
Contributor Author

Ombuweb commented Dec 2, 2022

I think the ImageAsset class has bugs. On iOS, the ios property returns undefined and the nativeImage property returns undefined on Android.

@Ombuweb
Copy link
Contributor Author

Ombuweb commented Dec 3, 2022

@rigor789 I think we should move ImageSource from /guide/core to /guide/ui/image-source. Then for the sidebar we can have following structure:

UI
...

  • Image
    • index.md (component content)
    • image-source.md
    • image-cache.md

...

@rigor789
Copy link
Member

rigor789 commented Dec 3, 2022

/guide/ui/image-source sounds good 👍

@NathanWalker NathanWalker changed the base branch from main to dev July 17, 2023 19:23
@NathanWalker NathanWalker merged commit 0468b3f into NativeScript:dev Jul 17, 2023
NathanWalker added a commit to Ombuweb/docs that referenced this pull request Aug 13, 2023
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
NathanWalker added a commit to Ombuweb/docs that referenced this pull request Aug 30, 2023
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants