Store static data in Android - custom resource?

前端 未结 4 564
旧时难觅i
旧时难觅i 2020-12-08 01:28

I\'m new to Android development, and I\'ve been playing around with it a bit. I was trying to create a program that has a small database-like collection of never-changing d

4条回答
  •  旧时难觅i
    2020-12-08 01:42

    I think this is the BEST solution and i am already using this one to store Static-data in my every project.

    For that... You can do one thing, make one xml file namely "temp.xml" ..and store the data in temp.xml as follows:

       
    
    
         Blob 1  
          23 
          42  
        
    
        Blob 2      
         34 
         21 
        
    
    
        
    

    and then use XML PullParser technique to parse data. You can have coding samples of PullParsing technique on Example , refer this example for better idea.

    Enjoy!!

提交回复
热议问题