I am attempting to write some tests to "assert" the headers of my settings app are being properly built. The settings app was built by someone else so I am attempting to understand their code before doing anything. They used "Preference Fragments" in this app. what is the difference between those fragments and "regular" fragments? How can I assert, using robolectric, that the fragment headers were built properly?
答案 0 :(得分:1)
Preference fragments are very different from regular fragment. Their layout is defined by the system and the content is inflated from XML resources. The purpose of this is to provide consistent settings screens in your apps. Have a look at the API Guide for more info.