Android Question Create layout for a newspaper feed , modify sql database create more dinamic layout in the app

hookshy

Well-Known Member
Licensed User
Longtime User
I am working on a app using a sql database.
I have my database ready for showing a list with a picture and a content .
But what happens if I have more pictures or multiple informations that needs more complex layout design ..how does the relation between database and layout from the app works ?
How should I modify my database in order to show the content with more layout formats like in a newspaper ?

For now I only think of a column that could store a layout format for the data ...if var=0 then show pictures in a horizontal scolview ,if var=0 show pictures in a vertical scroll view and so on
Please advise how do you think this can be done to make your layout look more dynamic and nice.
Thanks
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
I would probably attempt to use a CustomListView as per the examples Erel posted recently. You could load a default layout into a Panel on the CustomListView and show some teaser info. Add more panels for each item of news you want to show and when the user clicks on a panel you could expand to show the full article.
Just an idea. ;)
 
Upvote 0

hookshy

Well-Known Member
Licensed User
Longtime User
The newsfeed has a miniature picture and a sample content ... when I click I line I can open new activity and get details for that article
I can expand each item ...but what I want to do is that each row have diferent style
It is allmost impsible to have 100 rows with 100 layouts ...but at least to make some
Wow the app will know to display some layout format....and how should the sql table look in this case , to keep data for diferent layouts ?
 
Upvote 0
Top