podcast-app | Android podcast app made with Jetpack Compose and ExoPlayer | Android library
kandi X-RAY | podcast-app Summary
kandi X-RAY | podcast-app Summary
Android podcast app made with Jetpack Compose and ExoPlayer. Podcast information provided by Listen Notes API.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of podcast-app
podcast-app Key Features
podcast-app Examples and Code Snippets
Community Discussions
Trending Discussions on podcast-app
QUESTION
I'm new to C# so I will try to explain this to the best of my abillity.
I'm creating a simple podcast-application in C# and trying to use an XML-reader to recieve an RSS feed and then putting that information into diffrent winforms.
I've worked out how to get the main information I want into a listBox. What I cannot figure out however, is to get another piece of information (the summary) from the RSS feed into a richTextBox by clicking a list item in the listBox.
The class I made to read the RSS feed.
List item
...ANSWER
Answered 2019-Oct-23 at 07:59Here are a few pointers:
- Make a class where you store the information from RSS for each element (eg. MyPodcastEntry.cs with properties Index (count), Subject, Summary, ...)
- Populate those classes in your rssRead and add them to a List
- Add that list to the listbox instead of using Tuple<>
- Override ToString in that class to adjust how they are displayed in the listbox
This will help you keep and use the information from RSS. There is no need to run rssRead every time you click the listbox. Once you have read the RSS feed and put the data into your class then you can access this information any time.
Now in your MouseClick event handler you can access the SelectedItem of the listbox, cast it to your class, and then access the properties that you previously assigned, to assign to the richtextbox text, no need for either rssRead or the loop.
Optional stuff:
- instead of MouseClick event, use SelectedIndexChanged
- There are a bunch of rss feed reader nugets available, no need to make your own nvm you're using Syndication which is fine :)
- Clean code
- Unused variables x, y
- Define variables subject and summary in the foreach instead of at the top
- Better yet, don't use subject and summary variables at all since their values are already stored in item.Title.Text and item.Summary.Text
Have fun with C#!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install podcast-app
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page