setDefaults

abstract fun setDefaults(defaults: Map<String, Any>)

Sets map with default values. Map will be overwritten each time this method is called.

Parameters

defaults

Map with defaults


abstract fun setDefaults(@XmlRes resId: Int, onComplete: () -> Unit? = null)

Sets defaults by XML resource with ID. Calls the onComplete listener when defaults are saved. XML format:

<defaults>
<entry>
<key>first_button_color</key>
<value>green</value>
</entry>
<entry>
<key>second_button_padding</key>
<value>134</value>
</entry>
<entry>
<key>is_third_button_enabled</key>
<value>false</value>
</entry>
</defaults>

Parameters

resId

Int XML resource ID with defaults.

onComplete

Listener.