要显示Preference的间隔线
关键就在于要同时配置这两个属性:
app:allowDividerAbove="true"
app:allowDividerBelow="true"
<Preference
app:allowDividerBelow="true"
app:key="serial_num"
app:summary="Unknown"
app:title="序列号" />
<SwitchPreference
app:allowDividerAbove="true"
app:allowDividerBelow="true"
app:defaultValue="false"
app:key="log_switch"
app:title="log开关" />
<Preference
app:allowDividerAbove="true"
app:allowDividerBelow="true"
app:key="clear_log"
app:title="清除log" />