android - Advice on what I should be in making an application that reads multiple .txt files -


This coding problem is not a problem, I need general advice.

I am making an application which shows a listing with multiple text files. I want to select the desired article for the user that they want to read and it has been said that the article provided for them. Will go I have already applied a Master / Extension SEC, but it is only reading articles in a steady array (which will later be converted into an extension list and more dynamic ways to read files).

My question is: Can I create a database for ~ 30-40 text files and create a onlistclick - database adapter function or Assetmanager (Or something else) should be used.

I am new to Android programming and this is my first proper application, so any suggestions that would be suitable for the novice, would be very binding.

If those text files are going to be modified very often, then a local database There is a good idea to make.

On the other hand if you only need those 30-40 fixed text files and you are planning to add more by app update, then make your life easier by using the asset folder You can. Make a round in all the files and use them to make the list.

Code snippet for property use:

  AssetManager property = context.getAssets (); // If you are inside a string file, then you are in an activity or use 'getActivity ()' [] = assets.list ("folder_inside_assets"); // use assets.listFiles ("folder"); If you want an array of file objects  

Comments