-
public interface EmojiPreferenceInterfaceUsed to store and retrieve preferences with possibly different backends
-
-
Method Summary
Modifier and Type Method Description abstract StringgetSelected(Context context)Returns the id/hash of the currently selected emoji pack, or a default value if there is none abstract UnitsetSelected(Context context, String value)Stores the id/hash of the currently/newly selected emoji pack abstract StringgetDefault(Context context)Returns the name of the default pack for this application. abstract UnitsetDefault(Context context, String value)Sets the id/hash of the default emoji pack for this application. abstract StringgetNameForCustom(Context context, String hash)The preference name/key for the custom names preference abstract UnitsetNameForCustom(Context context, String name, String hash)Returns the name assigned for a certain custom/imported emoji pack. -
-
Method Detail
-
getSelected
abstract String getSelected(Context context)
Returns the id/hash of the currently selected emoji pack, or a default value if there is none
-
setSelected
abstract Unit setSelected(Context context, String value)
Stores the id/hash of the currently/newly selected emoji pack
-
getDefault
abstract String getDefault(Context context)
Returns the name of the default pack for this application. Note: Usually, this should be SYSTEM_DEFAULT, but it may be overridden, if the application e.g. comes with an Asset-based default pack.
-
setDefault
abstract Unit setDefault(Context context, String value)
Sets the id/hash of the default emoji pack for this application. Note: You should <i>never</i> use a de.c1710.filemojicompat_ui.packs.FileBasedEmojiPack here, because it may be deleted by the user. If you want to update their choice, use setSelected instead. Usually you would use a de.c1710.filemojicompat_ui.packs.AssetEmojiPack here.
-
getNameForCustom
abstract String getNameForCustom(Context context, String hash)
The preference name/key for the custom names preference
-
setNameForCustom
abstract Unit setNameForCustom(Context context, String name, String hash)
Returns the name assigned for a certain custom/imported emoji pack. Note: You should only use this for display, internally, you should use the de.c1710.filemojicompat_ui.structures.EmojiPack.id/hash of the pack.
- Parameters:
hash- The file hash of the pack
-
-
-
-