Reputation: 6891
I try to read an rss feed and display on the webview and listview. When I run my code into the Xamarin Android emulator, it is displaying as below. Display looks corrupted?
[Click here][2] for the rss feed url. I am reading the description element of each item and displaying them in the vebview. As you can see each description is pretty long but it is display only part of the description until the straight line for each. Why is it truncation?
ListView.ItemTemplate>
</StackLayout>
</ViewCell>
</DataTemplate>
and the convertor
public class HtmlSourceConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var html = new HtmlWebViewSource();
if (value != null)
{
html.Html = value.ToString();
}
return html;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Upvotes: 1
Views: 1579
Reputation: 3306
It's generally just a bad idea to even try to nest a web view inside a list view. Even a nested scroll views can cause UX problems. I would recommend using a different kind of view for your cells.
I think the good way to do it is to just try to grab the content and throw it in a label.
I had seen a similar type of quest in Xamarin Forums : webview inside a listview
Upvotes: 2