简体   繁体   中英

Best way to implement news feed - similar to sky news app

I'm currently in the process of producing a final year project, I decided on an android application after doing two years of java programming during the course. After deciding upon an music news and event notifier app, I was research existing app which I could take inspiration from. I decided that I would like to style my new feed closely on the sky news app, I've done some research I think I will use a listItem which will direct to a new activity.

I'm just a little confused on the best way to store the articles (which will be written by myself for the purpose of the app) and retrieve the information to be displayed. Only 6 articles will be available via the app so as new articles are added, they will replace older stories on the news feed.

My first thought was a mysql database on a server, the documents could be stored separately and referred to in a table. The database could also hold information of upcoming events and gigs as well.

Saying I'm an android noob is an understatement, I know I could possibly do a little more research myself but to be honest I was more hope someone could point me in the right direction.

Any hints or tips would be much appreciated

Thank You

Link to photo example

It is not clear whether you are going to implement the server yourself or you are going to consume a remote web service.

In any case, you'll want to consume REST web services and read the news information in JSON, since it is pretty much straighforward to do.

As for storing the information, Android already has a DBMS implemented, which is SQLite. One table to store the news should be enough, but it depends on what you're willing to do.

To display the information, sounds like you want to implement tabs, with a ListView for showing each news item. Since you want to show 6 at a time, you can both use a trigger in the database to fire on insert, or manually replace them (and limit your query results to 6 every time).

A click in the news item should then fire an event and direct you to the details of a news item.

Your question has a lot of unclear points, so I'll leave it at this and I hope it helps you in focusing your research.

The first screen is a simple list activity loaded from a server in your case.

Remote loading lists

Lazy list

The second screen can be a webview displaying an HTML page.

Web View

Do you need more info ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM