How do we determine what layout folder does the application originally search for?
eg.
Application searches for layout-sw600dp but uses layout-xhdpi because sw600dp is not existing.
The process for selecting the appropriate resources to use is outlined in the Providing Resources document in the Android Developer's guide.
- Eliminate resource files that contradict the device configuration.
- Pick the (next) highest-precedence qualifier in the list
- Do any of the resource directories include this qualifier?
- If No, return to step 2 and look at the next qualifier.
- If Yes, continue to step 4.
- Eliminate resource directories that do not include this qualifier.
- Go back and repeat steps 2, 3, and 4 until only one directory remains.
In short, Android applications don't "look for" specific resource files; rather they pick the best matching resource file for a given device.
The table of qualifier precedence can be found here.