I created a custom preference but its paddings do not look like paddings of a standard preference. Does anybody know a way how they can be added without playing with numbers? On the pic with the blue background is a new preference item without preset paddings.

After testing on several devices found out that on different devices standard paddings are different. It makes UI inconsistent if paddings were set up manually.
Intent on the left side is a place for an icon. Preference layout has its own margins for the content. If I inflate my own layout I have to define spaces and margins by my own, layout cannot be inherited partially.
However Preference has a “widgetLayout” layout which takes the rest of the space on the right side of the preference control. This space can be customized with preferred layout.