[Q] Regarding layout and storing of data

K12

Member
Nov 27, 2007
46
7
0
Kuala Lumpur
Hi there, I'm in the middle of building an app with the same navigation structure as this app which involves a list of items which when clicked displays details pertaining to that item in another layout.

So I wanted to ask a few questions:
1) Which is better?
a) To use fragments, one for the listView and another one to display the details.
b) To use 2 separate activities for each layout and to pass data using intents to handle selection.

2) What is a better way to store data in this case? JSON or SQLite? Can you please briefly explain why?

Thanks for your time.
 

Jonny

Retired Forum Moderator
Jul 22, 2011
9,285
9,606
263
Birmingham
jonathonfitch.com
Hi there, I'm in the middle of building an app with the same navigation structure as this app which involves a list of items which when clicked displays details pertaining to that item in another layout.

So I wanted to ask a few questions:
1) Which is better?
a) To use fragments, one for the listView and another one to display the details.
b) To use 2 separate activities for each layout and to pass data using intents to handle selection.

2) What is a better way to store data in this case? JSON or SQLite? Can you please briefly explain why?

Thanks for your time.
1) A: Fragments as its easier to create large screen (tablet/phablet) layouts for fragments as you can have them side-by-side

2) SQLite - fast, easy to store and get data from, easy to code for, compact.
 

K12

Member
Nov 27, 2007
46
7
0
Kuala Lumpur
1) A: Fragments as its easier to create large screen (tablet/phablet) layouts for fragments as you can have them side-by-side

2) SQLite - fast, easy to store and get data from, easy to code for, compact.
Regarding 2),

If I want to make the app accessible to people of different languages, which would be a better approach?
a) To create separate databases for different languages.
b) To create one database with the relevant tables for different languages.
 

Jonny

Retired Forum Moderator
Jul 22, 2011
9,285
9,606
263
Birmingham
jonathonfitch.com
Regarding 2),

If I want to make the app accessible to people of different languages, which would be a better approach?
a) To create separate databases for different languages.
b) To create one database with the relevant tables for different languages.
I would go for having one database and relevant tables for the different languages.
 
  • Like
Reactions: K12