This is a migrated thread and some comments may be shown as answers.

RadListView on Android (NS 3.0.0, UI 2.0.1) - image not shown

1 Answer 29 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Clarence
Top achievements
Rank 2
Clarence asked on 08 May 2017, 04:59 AM

Found that RadListView on Android is not showing images within the list item template.

 

Versions:

  • NativeScript 3.0.0
  • UI for NativeScript 2.0.1

 

Steps to re-produce:

  • Clone the sample project I prepared (https://github.com/skywidesoft/ns-radlistview-test.git)
  • tns run ios --emulator (when run on iOS, the image was shown)
  • tns run android --emulator (when run on Android, the image was not shown)

 

This problem not existing in older versions of NativeScript and UI for NativeScript.

 

Kindly advice

Regards

Clarence

 

1 Answer, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 08 May 2017, 11:39 AM
Hello Clarence Ho,

Thank for the detailed report and the ready for test sample application!
After some investigation, we were able to find the reason for this issue and the reason is a bug introduced with NativeScript 3.0.0 related to the src property of ImageSource module. The bug is that the src property was only accepting string but not ImageSource as a value in an Android application.
The good news is that this problem is already fixed and is currently in the master branch for NativeScript modules. The fix will be officially released with our incoming patch versions 3.0.1 which is expected within few days.

Meanwhile, you can use one of the following solutions as a temporary workaround:

Solution  1
You can apply the fix using the next version of tns-core-modules.
Steps needed to apply the next version
rm -rf node_modules
rm -rf platforms
tns plugin add tns-core-modules@next
npm install
tns run android
No changes in the code are required - the application will show the images in Android as well.

Solution  2
In your test application change the image_source property for Item class to accept a string (instead of ImageSource) and then in your item-service file and pass directly the URL as a string instead of ImageSource.

Once again I am sorry for any inconvenience caused and I hope you will find the solutions provided applicable.

Regards,
Nikolay Iliev
Telerik by Progress
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
ListView
Asked by
Clarence
Top achievements
Rank 2
Answers by
Nick Iliev
Telerik team
Share this question
or