Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use res/xml vs.res/layout folders in Android

I am creating preferences for my app and noticed some examples store the XML in res/layout and other store them in res/xml. Is there a reason or best practice to store them in one vs. the other ? I already have a bunch of layout files in my res/layout folder, so does it make sense to put the preference layout files in res/xml ?

like image 396
Drake Amara Avatar asked Apr 16 '13 01:04

Drake Amara


1 Answers

This is from Google.

use res/xml/ for arbitrary XML files that can be read at runtime by calling Resources.getXML().

like image 56
nautilusvn Avatar answered Nov 15 '22 19:11

nautilusvn