I want to create an android App that getting Arabic news by RSS Feeds.
I want to know if there are any way to dynamically get the Rss feeds and separate them according to its topics?
Thanks for Advance.
There are at least two ways of doing this.
The first way is to look for a source that provide you with different topics, here's an example of what I mean. With those different topics being treated as each individual news feed, you are able to display them separately.
The second way is to not directly display the feed using ListView. You should first, store the news feeds into somewhere for pre-processing, for instance, you can use SQLite. While storing each news, you include a new column for your desired 'grouping' for separation. After that, you can create an adapter that pull news from this source (or SQLite) and display them in your ListView.
Pardon me for only providing you with the concepts, as I don't have a sample code to show you. I hope you understand what I am trying to describe to you.
I have started Android development recently.
My ambition is to create an application which send an http request to get a list of posts.
For each post (in json), there is a name, a date and the content of the post.
I know how to parse a json file and how to fill objects.
I am curious about what kind of containers I should use. Is a ListView a nice choice?
It depends on the layout structure or some other details you need. I mean maybe your images are located in two or three columns or something like that. Otherwise of course you need to use ListView.
See this: http://developer.android.com/guide/topics/ui/declaring-layout.html#AdapterViews
I am developing one application for one real state website. I have to display dynamic content from web I mean website display lots of images and description about the property. i need to populate images and their description in list view similar to flipkart android app do. I don't know how to proceed as of now i have thought i can download all images to sd card and get the text from json and then populate both in custom list. but i feel this is not a good approach as images grows in no it would take memory. Please give me some pointer how i should proceed to get better results.
Thanks in advance. Any help will appreciated.
You can simply use custom listview with image and text.
Get image and text both from web.
You can also refer to this link.
In my android mobile app, i have list of lot of (more than 200) images and textviews. For that currently i am using gridview.
But my problem is if i am request all that content at once from server then its take too much time to load and render that images and text in gridview which affect user experience.
So i thought of load only 30-40 items at once and then provide load more button at end. But it is not appropriate way to do this thing.
So can anyone please give me other alternatives to do this thing?
fallow this tutorial analyze code and use it.developer tutorial for displaying images.
I am building an app that scrapes a certain web site and presents the latest news in a listview, html formattted with an image, a title and a summary. When the user clicks on a row, the news article is showed. It works a bit like the CNet app and similar news apps.
I have no problems with the scraping part, but I am in doubt on how to manage the summary list.
My initial idea is to have a listview where each item is a webview. The listview is populated by a custom ArrayAdapter filled with the scraped html content. Each screen will show the summaries from the 30 most recent articles, ie. up to a month old.
Is this approach recommended or will 30 webviews take up too many system resources?
Would it actually be better to use on big webview, using simple html (ul) to show the summary list?
Also, is an array adaptor the right way to go, or would a cursor be better?
If there are completely different ways to do this, please let me know!
Thanks.
Webview is not a bad approach, but there are better ways. I'd suggest to show the text normally (I mean, in a TextView). I'd use WebView if you are going to show long HTML content that has a complex format or use CSS... but, what you want is showing a preview, so keep it simple. It will be also faster, and more maintainable if you do it in a TextView.
With regards to the adapter... it really depends on how are you persisting the data. If you are just fetching those feeds from internet, parsing them and showing them right away, then you have no choice but using an ArrayAdapter or something like that. On the other hand, if you are persisting your data into a Sqlite database, then CursorAdapter is much better.
Romain Guy, the developer on the Android team who is most vocal on the web helping developers actually said in one of his talks (which you can find on YouTube...not sure which one) that technically you "could" do that, but he'd be extremely upset with you if you did. lol
There is probably too much going on in a WebView to make this the ideal choice of ListView items. I would create a "model" object representing the data for each item that you're abstracting and just make an xml layout that you can populate in a custom adapter.
This video is GREAT info if you're working with ListView
http://www.youtube.com/watch?v=wDBM6wVEO70
I don't see why the application wouldn't be able to handle the 30 html feeds, so you should be good there.
A ListView should be fine to use. Obviously, this all depends on how you want the UI to look and feel.
Lastly, a cursor adapter is used when using a cursor from a db query. Unless you're storing the feeds in a local db, this doesn't seem to be what you're doing. So, the array adapter should work fine for you.