Although a bit late I`m having same troubles with dividers in preff screen and found this solution:
Set custom style to the hosting activity and add to the style:
- @null
It actually does the same as setting it trough code but you save one findById and i think it looks clearer set trough styles