Nativescript: Show image as circle with any resolution.

Created on 21 Aug 2017  路  3Comments  路  Source: NativeScript/NativeScript

Hi Iam new to nativescript development. While doing project I met an issue as an images as rectangle resolution. When apply
width:100; height:100; border-radius:50%;
Is is not showing as a circle but it showing as elipse. Is there any way to achive my goal.

ios question

Most helpful comment

To anyone still having this issue, I found that setting stretch="none" on the <Image> (instead of aspectFill or aspectStretch) solved the problem.

All 3 comments

Hi @vijaykumarbollavaram,
I reviewed your case and tested the scenario with the borderRadius, however, the radius seems to be applied properly on the image. For your convenience, I am attaching sample project and a screenshot from the simulator.
Make sure that you have set the correct width and height to the image, which corresponds to the image size.
Archive.zip
screen shot 2017-08-21 at 3 08 20 pm

To anyone still having this issue, I found that setting stretch="none" on the <Image> (instead of aspectFill or aspectStretch) solved the problem.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fmmsilva picture fmmsilva  路  3Comments

dhanalakshmitawwa picture dhanalakshmitawwa  路  3Comments

valentinstoychev picture valentinstoychev  路  3Comments

Leo-lay picture Leo-lay  路  3Comments

tsonevn picture tsonevn  路  3Comments