Rafi Fahreza
Member
hi guys i use the library RSSParser, and here's my code:
i used a searchview using appcompat, when i click search for the first time, its worked, but for the second its getting error
RSSParser:
Sub Search_QuerySubmitted(Query As String)
sv.Iconfied = True
si.ItemCollapsed = True
getNews(Query)
End Sub
Sub getNews(country As String)
Parse("https://news.google.com/rss/search?q=coronavirus%20"&country&"&sortBy=published&hl=en-ID&gl=ID&ceid=ID:en")
End Sub
Sub Parse(url As String)
rss.ParseRSS(url)
End Sub
Sub RSS_Completed(articles As Object)
Dim dates As String
clvNews.Clear
If articles <> Null Then
Dim articleList As List = articles
If articleList.Size > 0 Then
For i = 1 To 3
Dim art As Article = articleList.Get(i)
dates = DateUtils.TicksToString(art.PubDate)
clvNews.Add(CreateListNews(art.Title, dates, art.Description),art.Link)
Next
End If
End If
End Sub
i used a searchview using appcompat, when i click search for the first time, its worked, but for the second its getting error
Error:
cannot execute task: the task has already been executed (a task can be executed only once) b4a