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

image from URI is not showing in List view

4 Answers 167 Views
This is a migrated thread and some comments may be shown as answers.
Software
Top achievements
Rank 1
Software asked on 14 Nov 2018, 05:20 PM

Hi There

Recently I have upgraded from Telerik.UI.for.Xamarin.Trial  Version="2018.3.1018.1" to Telerik.UI.for.Xamarin  Version="2018.3.1109.1" . The problem is that it used to show image from URL before upgrade in my android emulator. But now its stopped showing the image in the list view. Not sure where is the problem in my code. Here is the snippet of my code:

<telerikDataControls:RadListView ItemsSource="{Binding VolumeList}" x:Name="listView" ItemTapped="Results_ItemTapped">
            <telerikDataControls:RadListView.ItemTemplate>
                <DataTemplate>
                <telerikListView:ListViewTemplateCell>
                    <telerikListView:ListViewTemplateCell.View>
                        <Grid>
                            <StackLayout Orientation="Horizontal" Spacing="20" >
                                <Image  Source="{Binding ImageUrl}" HeightRequest="70" WidthRequest="70"/>
                                <StackLayout>
                                <Label  Text="{Binding VolumeSubject}" TextColor="Black" />
                                <Label Text="{Binding SpeakerName}" TextColor="Gray" />
                                </StackLayout>
                            </StackLayout>
                        </Grid>
                    </telerikListView:ListViewTemplateCell.View>
                </telerikListView:ListViewTemplateCell>
            </DataTemplate>
            </telerikDataControls:RadListView.ItemTemplate>
            <telerikDataControls:RadListView.LayoutDefinition>
                <telerikListView:ListViewLinearLayout ItemLength="70" />
            </telerikDataControls:RadListView.LayoutDefinition>
        </telerikDataControls:RadListView>

4 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 14 Nov 2018, 06:11 PM
Hi Tahmina,

I don't see anything particularly wrong with the code. I've built a test app using that precise code and it's working as expected.

Test Demo

Find the test app attached, here's the result at runtime:



The ViewModel is simply:

public class ViewModel : ViewModelBase
{
    public ViewModel()
    {
        for (int i = 1; i < 9; i++)
        {
            VolumeList.Add(new Volume
            {
                SpeakerName = $"Speaker {i}",
                VolumeSubject = $"Subject {i}",
                ImageUrl = $"https://[full path in demo]/Image_0{i}.jpg"
            });
        }
    }
 
    public ObservableCollection<Volume> VolumeList { get; set; } = new ObservableCollection<Volume>();
}


Rebuilding After Manual Clean

Since you mentioned that there was a version and package change, you could be experiencing a common Xamarin problem with assembly references.

Take the follow steps to get a clean build:

1 - Close Visual Studio
2 - Navigate to the solution in File Explorer
3 - Go through every project and permanently delete that project's bin and obj folders
4 - If there is a Packages folder in the solution root, delete that as well (you shouldn't have this, but just in case)

5 - Open the solution in Visual Studio again
6 - Rebuild the Class Library project first
7 - Rebuild the target platform project next (Android in this case)

When these steps are completed, you've manually ensured that you've compiled the app using the latest references.


Further Assistance

If you are still having trouble, please open a Support Ticket here and share the project with us so we can investigate directly. Alternatively, if you can make my demo reproduce the issue, send that to us instead.

Note: If you delete the bin and obj folders before zipping up the solution, the ZIP file size should only be a few MBs (you can attach a ZIP file to a ticket reply).

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Software
Top achievements
Rank 1
answered on 14 Nov 2018, 08:30 PM

Hi Lance, Thanks for your reply . I did every step of your instruction but nothing happened. Moreover, I ran your demo project in my machine & same thing happened, images are not showing up except label texts :( 

0
Lance | Manager Technical Support
Telerik team
answered on 14 Nov 2018, 08:36 PM
Hello Tahmina,

At this point, I suspect internet connection with the emulator to be the cause. Can you deploy to a new emulator or device, one that has a confirmed internet connection, and try the app(s) again there?

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Software
Top achievements
Rank 1
answered on 14 Nov 2018, 08:54 PM

Thanks a bunch. Actually it was emulator problem. I wiped all the data and reboot it, it started to work fine.

Thanks again for quick solution

Asked by
Software
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Software
Top achievements
Rank 1
Share this question
or