Я новичок в xamarin.Я хочу отображать изображения с Google Drive в представлении XAML.Для этого я установил пакет nuget Google.Apis.Drive.v3.Вот мой код.
C # CODE
**DriveService** driveService = new **DriveService**();
var request = driveService.Files.List();
request.Q = "mimeType='image/jpeg'";
request.OauthToken = account.Properties["access_token"];
request.Fields = "nextPageToken,files(id, name, thumbnailLink, webViewLink)";
request.PageToken = pageToken;
request.PageSize = 20;
var result = request.Execute();
var DrivePhotos = new ObservableCollection<object>(result.Files);
XAML CODE
<StackLayout AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1">
<flv:FlowListView FlowColumnCount="3" RowHeight="100" SeparatorVisibility="Default"
HasUnevenRows="False" FlowItemsSource="{Binding DrivePhotos}" >
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<StackLayout Margin="3">
<!--<Image Source="{Binding thumbnailLink}" HeightRequest="100" WidthRequest="100" BackgroundColor="Aqua" />-->
<!--<Label Text="{Binding name}"></Label>-->
<ffimageloading:CachedImage HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Accent"
WidthRequest="300" HeightRequest="300"
DownsampleToViewSize="true"
Source="{Binding thumbnailLink}">
</ffimageloading:CachedImage>
</StackLayout>
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
</flv:FlowListView>
</StackLayout>
Я получаю эти поляв ответ идентификатор, имя, thumbnailLink, webViewLink.
Теперь я не могу отобразить thumbnailLink в теге xmal.Я также использую DLToolkit.Forms.Controls.FlowListView для отображения изображений.
введите описание изображения здесь
Пожалуйста, помогите.