update docs + tutorial

This commit is contained in:
Kieran BW 2022-03-09 22:10:13 +00:00
parent 8f945a315a
commit 163e50d1cd
88 changed files with 655 additions and 43 deletions

View File

@ -19,6 +19,7 @@ patch-level version changes can be found in [commit messages](../../commits/mast
- Update navbar theme (dark/light rather than the app accent colour)
- Update dependencies
- Update tutorial location to [Tutorials](/documentation/tutorials)
- Update tutorial
## 20220128 - 2022/01/28

View File

@ -117,7 +117,7 @@ Android SDK. Additional information can be found at
1. Open the F-Droid app
2. Search for EweSticker
**Or**
or
[<img src="readme-assets/badges/f-droid-download.png"
alt="Get it on F-Droid" height="80">](https://f-droid.org/en/packages/com.fredhappyface.ewesticker/)
@ -130,7 +130,7 @@ then download/ install
1. Open the Google Play app
2. Search for EweSticker
**Or**
or
[<img src="readme-assets/badges/google-play-download.png"
alt="Get it on Google Play" height="80">](https://play.google.com/store/apps/details?id=com.fredhappyface.ewesticker)
@ -144,7 +144,7 @@ then download/ install
2. Select the debug or release APK depending on your preference. Note that the
filenames are in the form: com.fredhappyface.ewesticker-(version)-(debug|release).apk
**Or**
or
[<img src="readme-assets/badges/direct-apk-download.png" alt="Direct apk
download" height="80">](../../releases)

View File

@ -13,6 +13,7 @@ tasks.dokkaGfm.configure {
skipEmptyPackages.set(true)
sourceRoots.from(file("src/main/java"))
suppressInheritedMembers.set(true)
includeNonPublic.set(true)
}
}
}

View File

@ -8,7 +8,9 @@
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
android:dataExtractionRules="@xml/data_extraction_rules" tools:targetApi="s">
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/full_backup_content"
tools:targetApi="s">
<activity
android:name="com.fredhappyface.ewesticker.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"

View File

@ -10,10 +10,13 @@ private const val MAX_FILES = 4096
private const val MAX_PACK_SIZE = 128
/**
* TODO
* The StickerImporter class includes a helper function to import stickers from a user-selected
* stickerDirPath (see importStickers). The class requires the application baseContext and an
* instance of Toaster (in turn requiring the application baseContext)
*
* @property context
* @property toaster
* @property context: application baseContext
* @property toaster: an instance of Toaster (used to store an error state for later reporting to the
* user)
*/
class StickerImporter(
private val context: Context,
@ -25,9 +28,11 @@ class StickerImporter(
private var totalStickers = 0
/**
* TODO
* Used by the ACTION_OPEN_DOCUMENT_TREE handler function to copy stickers from a
* stickerDirPath to the appplication internal storage for access later on by the
* keyboard
*
* @param stickerDirPath
* @param stickerDirPath a URI to the stikers directory to import into EweSticker
*/
fun importStickers(stickerDirPath: String): Int {
File(this.context.filesDir, "stickers").deleteRecursively()

View File

@ -20,15 +20,20 @@ import java.io.FileOutputStream
import java.io.IOException
/**
* TODO
* The StickerSender Class used to contain all of the methods used for sending a sticker to an
* InputConnection
*
* @property context
* @property toaster
* @property internalDir
* @property currentInputConnection
* @property currentInputEditorInfo
* @property compatCache
* @property imageLoader
* @property context: application baseContext
* @property toaster: an instance of Toaster (used to store an error state for later reporting to the
* user)
* @property internalDir: the internal /stickers directory used when creating a compat sticker
* @property currentInputConnection: the currentInputConnection. i.e. the input field that the
* keyboard is going to send a sticker to
* @property currentInputEditorInfo: currentInputEditorInfo. i.e. info on the input field that the
* keyboard is going to send a sticker to
* @property compatCache: used to track previous x converted compat stickers
* @property imageLoader: coil imageLoader object used to convert a sticker file to a drawable ready
* for writing to a compat sticker
*/
class StickerSender(
private val context: Context,

View File

@ -7,7 +7,6 @@
<data-extraction-rules>
<cloud-backup>
<!--
TODO: Use <include> and <exclude> to control what is backed up.
The domain can be file, database, sharedpref, external or root.
Examples:
@ -33,4 +32,4 @@
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
</data-extraction-rules>

View File

@ -0,0 +1,2 @@
<full-backup-content>
</full-backup-content>

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[Cache](index.md)/[data](data.md)
# data
[androidJvm]\
private var [data](data.md): [LinkedList](https://developer.android.com/reference/kotlin/java/util/LinkedList.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt;

View File

@ -22,3 +22,10 @@ Basically this behaved like an ordered set with some maximum capacity. When this
| [get](get.md) | [androidJvm]<br>fun [get](get.md)(idx: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html))<br>Get an element |
| [toFiles](to-files.md) | [androidJvm]<br>fun [toFiles](to-files.md)(): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[File](https://developer.android.com/reference/kotlin/java/io/File.html)&gt;<br>convert this to a array of files |
| [toSharedPref](to-shared-pref.md) | [androidJvm]<br>fun [toSharedPref](to-shared-pref.md)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>convert this to a string to write to shared-pref |
## Properties
| Name | Summary |
|---|---|
| [data](data.md) | [androidJvm]<br>private var [data](data.md): [LinkedList](https://developer.android.com/reference/kotlin/java/util/LinkedList.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt; |
| [size](size.md) | [androidJvm]<br>private val [size](size.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 30 |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[Cache](index.md)/[size](size.md)
# size
[androidJvm]\
private val [size](size.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 30

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[activePack](active-pack.md)
# activePack
[androidJvm]\
private var [activePack](active-pack.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[addPackButton](add-pack-button.md)
# addPackButton
[androidJvm]\
private fun [addPackButton](add-pack-button.md)(tag: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)): [ImageButton](https://developer.android.com/reference/kotlin/android/widget/ImageButton.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[compatCache](compat-cache.md)
# compatCache
[androidJvm]\
private var [compatCache](compat-cache.md): [Cache](../-cache/index.md)

View File

@ -0,0 +1,8 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[createPackIcons](create-pack-icons.md)
# createPackIcons
[androidJvm]\
private fun [createPackIcons](create-pack-icons.md)()
Create the pack icons (image buttons) that when tapped switch the pack (switchPackLayout)

View File

@ -0,0 +1,16 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[createPackLayout](create-pack-layout.md)
# createPackLayout
[androidJvm]\
private fun [createPackLayout](create-pack-layout.md)(stickers: [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[File](https://developer.android.com/reference/kotlin/java/io/File.html)&gt;): [FrameLayout](https://developer.android.com/reference/kotlin/android/widget/FrameLayout.html)
Create the pack layout (called by switchPackLayout if the FrameLayout is not cached)
## Parameters
androidJvm
| | |
|---|---|
| stickers | |

View File

@ -0,0 +1,12 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[createPartialPackLayout](create-partial-pack-layout.md)
# createPartialPackLayout
[androidJvm]\
private fun [createPartialPackLayout](create-partial-pack-layout.md)(): [Pair](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html)&lt;[FrameLayout](https://developer.android.com/reference/kotlin/android/widget/FrameLayout.html), [GridLayout](https://developer.android.com/reference/kotlin/androidx/gridlayout/widget/GridLayout.html)&gt;
Create the initial pack layout (the pack container and the grid)
#### Return
Pair packContainer to pack

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[fullIconSize](full-icon-size.md)
# fullIconSize
[androidJvm]\
private var [fullIconSize](full-icon-size.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[iconSize](icon-size.md)
# iconSize
[androidJvm]\
private var [iconSize](icon-size.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[iconsPerX](icons-per-x.md)
# iconsPerX
[androidJvm]\
private var [iconsPerX](icons-per-x.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[imageContainerCache](image-container-cache.md)
# imageContainerCache
[androidJvm]\
private var [imageContainerCache](image-container-cache.md): [HashMap](https://developer.android.com/reference/kotlin/java/util/HashMap.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), [FrameLayout](https://developer.android.com/reference/kotlin/android/widget/FrameLayout.html)&gt;

View File

@ -17,8 +17,36 @@ ImageKeyboard class inherits from the InputMethodService class - provides the ke
| Name | Summary |
|---|---|
| [addPackButton](add-pack-button.md) | [androidJvm]<br>private fun [addPackButton](add-pack-button.md)(tag: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)): [ImageButton](https://developer.android.com/reference/kotlin/android/widget/ImageButton.html) |
| [createPackIcons](create-pack-icons.md) | [androidJvm]<br>private fun [createPackIcons](create-pack-icons.md)()<br>Create the pack icons (image buttons) that when tapped switch the pack (switchPackLayout) |
| [createPackLayout](create-pack-layout.md) | [androidJvm]<br>private fun [createPackLayout](create-pack-layout.md)(stickers: [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[File](https://developer.android.com/reference/kotlin/java/io/File.html)&gt;): [FrameLayout](https://developer.android.com/reference/kotlin/android/widget/FrameLayout.html)<br>Create the pack layout (called by switchPackLayout if the FrameLayout is not cached) |
| [createPartialPackLayout](create-partial-pack-layout.md) | [androidJvm]<br>private fun [createPartialPackLayout](create-partial-pack-layout.md)(): [Pair](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-pair/index.html)&lt;[FrameLayout](https://developer.android.com/reference/kotlin/android/widget/FrameLayout.html), [GridLayout](https://developer.android.com/reference/kotlin/androidx/gridlayout/widget/GridLayout.html)&gt;<br>Create the initial pack layout (the pack container and the grid) |
| [onCreate](on-create.md) | [androidJvm]<br>open override fun [onCreate](on-create.md)()<br>When the activity is created... |
| [onCreateInputView](on-create-input-view.md) | [androidJvm]<br>open override fun [onCreateInputView](on-create-input-view.md)(): [View](https://developer.android.com/reference/kotlin/android/view/View.html)<br>When the keyboard is first drawn... |
| [onEvaluateFullscreenMode](on-evaluate-fullscreen-mode.md) | [androidJvm]<br>open override fun [onEvaluateFullscreenMode](on-evaluate-fullscreen-mode.md)(): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Disable full-screen mode as content will likely be hidden by the IME. |
| [onFinishInput](on-finish-input.md) | [androidJvm]<br>open override fun [onFinishInput](on-finish-input.md)()<br>When leaving some input field update the caches |
| [onStartInput](on-start-input.md) | [androidJvm]<br>open override fun [onStartInput](on-start-input.md)(info: [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?, restarting: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))<br>When entering some input field update the list of supported-mimes |
| [switchPackLayout](switch-pack-layout.md) | [androidJvm]<br>private fun [switchPackLayout](switch-pack-layout.md)(packName: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))<br>Swap the pack layout every time a pack is selected. If already cached use that otherwise create the pack layout |
## Properties
| Name | Summary |
|---|---|
| [activePack](active-pack.md) | [androidJvm]<br>private var [activePack](active-pack.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [compatCache](compat-cache.md) | [androidJvm]<br>private var [compatCache](compat-cache.md): [Cache](../-cache/index.md) |
| [fullIconSize](full-icon-size.md) | [androidJvm]<br>private var [fullIconSize](full-icon-size.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0 |
| [iconSize](icon-size.md) | [androidJvm]<br>private var [iconSize](icon-size.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0 |
| [iconsPerX](icons-per-x.md) | [androidJvm]<br>private var [iconsPerX](icons-per-x.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0 |
| [imageContainerCache](image-container-cache.md) | [androidJvm]<br>private var [imageContainerCache](image-container-cache.md): [HashMap](https://developer.android.com/reference/kotlin/java/util/HashMap.html)&lt;[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), [FrameLayout](https://developer.android.com/reference/kotlin/android/widget/FrameLayout.html)&gt; |
| [internalDir](internal-dir.md) | [androidJvm]<br>private lateinit var [internalDir](internal-dir.md): [File](https://developer.android.com/reference/kotlin/java/io/File.html) |
| [keyboardHeight](keyboard-height.md) | [androidJvm]<br>private var [keyboardHeight](keyboard-height.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0 |
| [keyboardRoot](keyboard-root.md) | [androidJvm]<br>private lateinit var [keyboardRoot](keyboard-root.md): [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html) |
| [loadedPacks](loaded-packs.md) | [androidJvm]<br>private lateinit var [loadedPacks](loaded-packs.md): [HashMap](https://developer.android.com/reference/kotlin/java/util/HashMap.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), [StickerPack](../-sticker-pack/index.md)&gt; |
| [packContent](pack-content.md) | [androidJvm]<br>private lateinit var [packContent](pack-content.md): [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html) |
| [packsList](packs-list.md) | [androidJvm]<br>private lateinit var [packsList](packs-list.md): [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html) |
| [recentCache](recent-cache.md) | [androidJvm]<br>private var [recentCache](recent-cache.md): [Cache](../-cache/index.md) |
| [sharedPreferences](shared-preferences.md) | [androidJvm]<br>private lateinit var [sharedPreferences](shared-preferences.md): [SharedPreferences](https://developer.android.com/reference/kotlin/android/content/SharedPreferences.html) |
| [stickerSender](sticker-sender.md) | [androidJvm]<br>private lateinit var [stickerSender](sticker-sender.md): [StickerSender](../-sticker-sender/index.md) |
| [toaster](toaster.md) | [androidJvm]<br>private lateinit var [toaster](toaster.md): [Toaster](../-toaster/index.md) |
| [totalIconPadding](total-icon-padding.md) | [androidJvm]<br>private var [totalIconPadding](total-icon-padding.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0 |
| [vertical](vertical.md) | [androidJvm]<br>private var [vertical](vertical.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[internalDir](internal-dir.md)
# internalDir
[androidJvm]\
private lateinit var [internalDir](internal-dir.md): [File](https://developer.android.com/reference/kotlin/java/io/File.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[keyboardHeight](keyboard-height.md)
# keyboardHeight
[androidJvm]\
private var [keyboardHeight](keyboard-height.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[keyboardRoot](keyboard-root.md)
# keyboardRoot
[androidJvm]\
private lateinit var [keyboardRoot](keyboard-root.md): [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[loadedPacks](loaded-packs.md)
# loadedPacks
[androidJvm]\
private lateinit var [loadedPacks](loaded-packs.md): [HashMap](https://developer.android.com/reference/kotlin/java/util/HashMap.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), [StickerPack](../-sticker-pack/index.md)&gt;

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[packContent](pack-content.md)
# packContent
[androidJvm]\
private lateinit var [packContent](pack-content.md): [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[packsList](packs-list.md)
# packsList
[androidJvm]\
private lateinit var [packsList](packs-list.md): [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[recentCache](recent-cache.md)
# recentCache
[androidJvm]\
private var [recentCache](recent-cache.md): [Cache](../-cache/index.md)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[sharedPreferences](shared-preferences.md)
# sharedPreferences
[androidJvm]\
private lateinit var [sharedPreferences](shared-preferences.md): [SharedPreferences](https://developer.android.com/reference/kotlin/android/content/SharedPreferences.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[stickerSender](sticker-sender.md)
# stickerSender
[androidJvm]\
private lateinit var [stickerSender](sticker-sender.md): [StickerSender](../-sticker-sender/index.md)

View File

@ -0,0 +1,16 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[switchPackLayout](switch-pack-layout.md)
# switchPackLayout
[androidJvm]\
private fun [switchPackLayout](switch-pack-layout.md)(packName: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Swap the pack layout every time a pack is selected. If already cached use that otherwise create the pack layout
## Parameters
androidJvm
| | |
|---|---|
| packName | String |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[toaster](toaster.md)
# toaster
[androidJvm]\
private lateinit var [toaster](toaster.md): [Toaster](../-toaster/index.md)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[totalIconPadding](total-icon-padding.md)
# totalIconPadding
[androidJvm]\
private var [totalIconPadding](total-icon-padding.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[ImageKeyboard](index.md)/[vertical](vertical.md)
# vertical
[androidJvm]\
private var [vertical](vertical.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false

View File

@ -0,0 +1,6 @@
//[app](../../index.md)/[com.fredhappyface.ewesticker](index.md)/[MAX_FILES](-m-a-x_-f-i-l-e-s.md)
# MAX_FILES
[androidJvm]\
private const val [MAX_FILES](-m-a-x_-f-i-l-e-s.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 4096

View File

@ -0,0 +1,6 @@
//[app](../../index.md)/[com.fredhappyface.ewesticker](index.md)/[MAX_PACK_SIZE](-m-a-x_-p-a-c-k_-s-i-z-e.md)
# MAX_PACK_SIZE
[androidJvm]\
private const val [MAX_PACK_SIZE](-m-a-x_-p-a-c-k_-s-i-z-e.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 128

View File

@ -0,0 +1,8 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[chooseDirResultLauncher](choose-dir-result-launcher.md)
# chooseDirResultLauncher
[androidJvm]\
private val [chooseDirResultLauncher](choose-dir-result-launcher.md): [ActivityResultLauncher](https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher.html)&lt;[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html)&gt;
Handles ACTION_OPEN_DOCUMENT_TREE result and adds stickerDirPath, lastUpdateDate to this.sharedPreferences and resets recentCache, compatCache

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[contextView](context-view.md)
# contextView
[androidJvm]\
private lateinit var [contextView](context-view.md): [View](https://developer.android.com/reference/kotlin/android/view/View.html)

View File

@ -0,0 +1,8 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[importStickers](import-stickers.md)
# importStickers
[androidJvm]\
private fun [importStickers](import-stickers.md)(stickerDirPath: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))
Import files from storage to internal directory

View File

@ -19,3 +19,18 @@ MainActivity class inherits from the AppCompatActivity class - provides the sett
|---|---|
| [chooseDir](choose-dir.md) | [androidJvm]<br>fun [chooseDir](choose-dir.md)(view: [View](https://developer.android.com/reference/kotlin/android/view/View.html))<br>Called on button press to choose a new directory |
| [enableKeyboard](enable-keyboard.md) | [androidJvm]<br>fun [enableKeyboard](enable-keyboard.md)(view: [View](https://developer.android.com/reference/kotlin/android/view/View.html))<br>Called on button press to launch settings |
| [importStickers](import-stickers.md) | [androidJvm]<br>private fun [importStickers](import-stickers.md)(stickerDirPath: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))<br>Import files from storage to internal directory |
| [onCreate](on-create.md) | [androidJvm]<br>protected open override fun [onCreate](on-create.md)(savedInstanceState: [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html)?)<br>Sets up content view, shared prefs, etc. |
| [refreshStickerDirPath](refresh-sticker-dir-path.md) | [androidJvm]<br>private fun [refreshStickerDirPath](refresh-sticker-dir-path.md)()<br>Reads saved sticker dir path from preferences |
| [seekBar](seek-bar.md) | [androidJvm]<br>private fun [seekBar](seek-bar.md)(seekBar: [SeekBar](https://developer.android.com/reference/kotlin/android/widget/SeekBar.html), seekBarLabel: [TextView](https://developer.android.com/reference/kotlin/android/widget/TextView.html), sharedPrefKey: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), sharedPrefDefault: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), multiplier: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 1)<br>Add seekbar logic for each seekbar in the layout |
| [showChangedPrefText](show-changed-pref-text.md) | [androidJvm]<br>internal fun [showChangedPrefText](show-changed-pref-text.md)()<br>Reusable function to warn about changing preferences |
| [toggle](toggle.md) | [androidJvm]<br>private fun [toggle](toggle.md)(compoundButton: [CompoundButton](https://developer.android.com/reference/kotlin/android/widget/CompoundButton.html), sharedPrefKey: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), sharedPrefDefault: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false, callback: ([Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)) -&gt; [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html))<br>Add toggle logic for each toggle/ checkbox in the layout |
## Properties
| Name | Summary |
|---|---|
| [chooseDirResultLauncher](choose-dir-result-launcher.md) | [androidJvm]<br>private val [chooseDirResultLauncher](choose-dir-result-launcher.md): [ActivityResultLauncher](https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher.html)&lt;[Intent](https://developer.android.com/reference/kotlin/android/content/Intent.html)&gt;<br>Handles ACTION_OPEN_DOCUMENT_TREE result and adds stickerDirPath, lastUpdateDate to this.sharedPreferences and resets recentCache, compatCache |
| [contextView](context-view.md) | [androidJvm]<br>private lateinit var [contextView](context-view.md): [View](https://developer.android.com/reference/kotlin/android/view/View.html) |
| [sharedPreferences](shared-preferences.md) | [androidJvm]<br>private lateinit var [sharedPreferences](shared-preferences.md): [SharedPreferences](https://developer.android.com/reference/kotlin/android/content/SharedPreferences.html) |
| [toaster](toaster.md) | [androidJvm]<br>private lateinit var [toaster](toaster.md): [Toaster](../-toaster/index.md) |

View File

@ -0,0 +1,16 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[onCreate](on-create.md)
# onCreate
[androidJvm]\
protected open override fun [onCreate](on-create.md)(savedInstanceState: [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html)?)
Sets up content view, shared prefs, etc.
## Parameters
androidJvm
| | |
|---|---|
| savedInstanceState | saved state |

View File

@ -0,0 +1,8 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[refreshStickerDirPath](refresh-sticker-dir-path.md)
# refreshStickerDirPath
[androidJvm]\
private fun [refreshStickerDirPath](refresh-sticker-dir-path.md)()
Reads saved sticker dir path from preferences

View File

@ -0,0 +1,20 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[seekBar](seek-bar.md)
# seekBar
[androidJvm]\
private fun [seekBar](seek-bar.md)(seekBar: [SeekBar](https://developer.android.com/reference/kotlin/android/widget/SeekBar.html), seekBarLabel: [TextView](https://developer.android.com/reference/kotlin/android/widget/TextView.html), sharedPrefKey: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), sharedPrefDefault: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html), multiplier: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 1)
Add seekbar logic for each seekbar in the layout
## Parameters
androidJvm
| | |
|---|---|
| seekBar | SeekBar |
| seekBarLabel | TextView - the label with a value updated when the progress is changed |
| sharedPrefKey | String - Id/Key of the SharedPreferences to update |
| sharedPrefDefault | Int - default value |
| multiplier | Int - multiplier (used to update SharedPreferences and set the seekBarLabel) |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[sharedPreferences](shared-preferences.md)
# sharedPreferences
[androidJvm]\
private lateinit var [sharedPreferences](shared-preferences.md): [SharedPreferences](https://developer.android.com/reference/kotlin/android/content/SharedPreferences.html)

View File

@ -0,0 +1,8 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[showChangedPrefText](show-changed-pref-text.md)
# showChangedPrefText
[androidJvm]\
internal fun [showChangedPrefText](show-changed-pref-text.md)()
Reusable function to warn about changing preferences

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[toaster](toaster.md)
# toaster
[androidJvm]\
private lateinit var [toaster](toaster.md): [Toaster](../-toaster/index.md)

View File

@ -0,0 +1,19 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[MainActivity](index.md)/[toggle](toggle.md)
# toggle
[androidJvm]\
private fun [toggle](toggle.md)(compoundButton: [CompoundButton](https://developer.android.com/reference/kotlin/android/widget/CompoundButton.html), sharedPrefKey: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), sharedPrefDefault: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false, callback: ([Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)) -&gt; [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html))
Add toggle logic for each toggle/ checkbox in the layout
## Parameters
androidJvm
| | |
|---|---|
| compoundButton | CompoundButton |
| sharedPrefKey | String - Id/Key of the SharedPreferences to update |
| sharedPrefDefault | Boolean - default value (default=false) |
| callback | (Boolean) -> Unit - Add custom behaviour with a callback - for instance to disable some options |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[context](context.md)
# context
[androidJvm]\
private val [context](context.md): [Context](https://developer.android.com/reference/kotlin/android/content/Context.html)

View File

@ -0,0 +1,20 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[fileWalk](file-walk.md)
# fileWalk
[androidJvm]\
private fun [fileWalk](file-walk.md)(rootNode: [DocumentFile](https://developer.android.com/reference/kotlin/androidx/documentfile/provider/DocumentFile.html)?): [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)&lt;[DocumentFile](https://developer.android.com/reference/kotlin/androidx/documentfile/provider/DocumentFile.html)&gt;
Get a MutableSet of DocumentFiles from a root node
#### Return
MutableSet<DocumentFile> set of files
## Parameters
androidJvm
| | |
|---|---|
| rootNode | parent dir to get all files from |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[filesLeft](files-left.md)
# filesLeft
[androidJvm]\
private var [filesLeft](files-left.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)

View File

@ -0,0 +1,20 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[importSticker](import-sticker.md)
# importSticker
[androidJvm]\
private fun [importSticker](import-sticker.md)(sticker: [DocumentFile](https://developer.android.com/reference/kotlin/androidx/documentfile/provider/DocumentFile.html))
Copies stickers from source to internal storage
#### Return
1 if sticker imported successfully else 0
## Parameters
androidJvm
| | |
|---|---|
| sticker | sticker to copy over |

View File

@ -5,7 +5,7 @@
[androidJvm]\
fun [importStickers](import-stickers.md)(stickerDirPath: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)
TODO
Used by the ACTION_OPEN_DOCUMENT_TREE handler function to copy stickers from a stickerDirPath to the appplication internal storage for access later on by the keyboard
## Parameters
@ -13,4 +13,4 @@ androidJvm
| | |
|---|---|
| stickerDirPath | |
| stickerDirPath | a URI to the stikers directory to import into EweSticker |

View File

@ -5,7 +5,7 @@
[androidJvm]\
class [StickerImporter](index.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), toaster: [Toaster](../-toaster/index.md))
TODO
The StickerImporter class includes a helper function to import stickers from a user-selected stickerDirPath (see importStickers). The class requires the application baseContext and an instance of Toaster (in turn requiring the application baseContext)
## Constructors
@ -17,4 +17,17 @@ TODO
| Name | Summary |
|---|---|
| [importStickers](import-stickers.md) | [androidJvm]<br>fun [importStickers](import-stickers.md)(stickerDirPath: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)<br>TODO |
| [fileWalk](file-walk.md) | [androidJvm]<br>private fun [fileWalk](file-walk.md)(rootNode: [DocumentFile](https://developer.android.com/reference/kotlin/androidx/documentfile/provider/DocumentFile.html)?): [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)&lt;[DocumentFile](https://developer.android.com/reference/kotlin/androidx/documentfile/provider/DocumentFile.html)&gt;<br>Get a MutableSet of DocumentFiles from a root node |
| [importSticker](import-sticker.md) | [androidJvm]<br>private fun [importSticker](import-sticker.md)(sticker: [DocumentFile](https://developer.android.com/reference/kotlin/androidx/documentfile/provider/DocumentFile.html))<br>Copies stickers from source to internal storage |
| [importStickers](import-stickers.md) | [androidJvm]<br>fun [importStickers](import-stickers.md)(stickerDirPath: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)<br>Used by the ACTION_OPEN_DOCUMENT_TREE handler function to copy stickers from a stickerDirPath to the appplication internal storage for access later on by the keyboard |
## Properties
| Name | Summary |
|---|---|
| [context](context.md) | [androidJvm]<br>private val [context](context.md): [Context](https://developer.android.com/reference/kotlin/android/content/Context.html)<br>: application baseContext |
| [filesLeft](files-left.md) | [androidJvm]<br>private var [filesLeft](files-left.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
| [packSizes](pack-sizes.md) | [androidJvm]<br>private var [packSizes](pack-sizes.md): [MutableMap](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt; |
| [supportedMimes](supported-mimes.md) | [androidJvm]<br>private val [supportedMimes](supported-mimes.md): [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt; |
| [toaster](toaster.md) | [androidJvm]<br>private val [toaster](toaster.md): [Toaster](../-toaster/index.md)<br>: an instance of Toaster (used to store an error state for later reporting to the user) |
| [totalStickers](total-stickers.md) | [androidJvm]<br>private var [totalStickers](total-stickers.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0 |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[packSizes](pack-sizes.md)
# packSizes
[androidJvm]\
private var [packSizes](pack-sizes.md): [MutableMap](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-map/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)&gt;

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[supportedMimes](supported-mimes.md)
# supportedMimes
[androidJvm]\
private val [supportedMimes](supported-mimes.md): [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt;

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[toaster](toaster.md)
# toaster
[androidJvm]\
private val [toaster](toaster.md): [Toaster](../-toaster/index.md)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerImporter](index.md)/[totalStickers](total-stickers.md)
# totalStickers
[androidJvm]\
private var [totalStickers](total-stickers.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0

View File

@ -17,5 +17,7 @@ Helper class to provide pack-related information A "Pack" is informally represen
| Name | Summary |
|---|---|
| [name](name.md) | [androidJvm]<br>internal val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Get the pack name (name of the pack directory) |
| [stickerList](sticker-list.md) | [androidJvm]<br>val [stickerList](sticker-list.md): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[File](https://developer.android.com/reference/kotlin/java/io/File.html)&gt;<br>Note: When MainActivity copies files over, it filters out all non-supported files (i.e. any file that is not supported as well as directories). Because of this there is no extra filter in this function. The exception is the base directory, which is handled in the constructor. |
| [stickers](stickers.md) | [androidJvm]<br>private val [stickers](stickers.md): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[File](https://developer.android.com/reference/kotlin/java/io/File.html)&gt;? |
| [thumbSticker](thumb-sticker.md) | [androidJvm]<br>val [thumbSticker](thumb-sticker.md): [File](https://developer.android.com/reference/kotlin/java/io/File.html)<br>Provides a sticker to use as the pack-nav container thumbnail. Currently just takes the first element, but could theoretically include any selection logic. |

View File

@ -0,0 +1,8 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerPack](index.md)/[name](name.md)
# name
[androidJvm]\
internal val [name](name.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Get the pack name (name of the pack directory)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerPack](index.md)/[stickers](stickers.md)
# stickers
[androidJvm]\
private val [stickers](stickers.md): [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[File](https://developer.android.com/reference/kotlin/java/io/File.html)&gt;?

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[compatCache](compat-cache.md)
# compatCache
[androidJvm]\
private val [compatCache](compat-cache.md): [Cache](../-cache/index.md)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[context](context.md)
# context
[androidJvm]\
private val [context](context.md): [Context](https://developer.android.com/reference/kotlin/android/content/Context.html)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[currentInputConnection](current-input-connection.md)
# currentInputConnection
[androidJvm]\
private val [currentInputConnection](current-input-connection.md): [InputConnection](https://developer.android.com/reference/kotlin/android/view/inputmethod/InputConnection.html)?

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[currentInputEditorInfo](current-input-editor-info.md)
# currentInputEditorInfo
[androidJvm]\
private val [currentInputEditorInfo](current-input-editor-info.md): [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?

View File

@ -0,0 +1,17 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[doCommitContent](do-commit-content.md)
# doCommitContent
[androidJvm]\
private fun [doCommitContent](do-commit-content.md)(mimeType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), file: [File](https://developer.android.com/reference/kotlin/java/io/File.html))
Send a sticker file to a InputConnectionCompat
## Parameters
androidJvm
| | |
|---|---|
| mimeType | String |
| file | File |

View File

@ -0,0 +1,16 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[doFallbackCommitContent](do-fallback-commit-content.md)
# doFallbackCommitContent
[androidJvm]\
private suspend fun [doFallbackCommitContent](do-fallback-commit-content.md)(file: [File](https://developer.android.com/reference/kotlin/java/io/File.html))
In the event that a mimetype is unsupported by a InputConnectionCompat (looking at you, Signal) create a temporary png and send that. In the event that png is not supported, alert the user.
## Parameters
androidJvm
| | |
|---|---|
| file | : File |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[imageLoader](image-loader.md)
# imageLoader
[androidJvm]\
private val [imageLoader](image-loader.md): ImageLoader

View File

@ -5,7 +5,7 @@
[androidJvm]\
class [StickerSender](index.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), toaster: [Toaster](../-toaster/index.md), internalDir: [File](https://developer.android.com/reference/kotlin/java/io/File.html), currentInputConnection: [InputConnection](https://developer.android.com/reference/kotlin/android/view/inputmethod/InputConnection.html)?, currentInputEditorInfo: [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?, compatCache: [Cache](../-cache/index.md), imageLoader: ImageLoader)
TODO
The StickerSender Class used to contain all of the methods used for sending a sticker to an InputConnection
## Constructors
@ -17,4 +17,20 @@ TODO
| Name | Summary |
|---|---|
| [doCommitContent](do-commit-content.md) | [androidJvm]<br>private fun [doCommitContent](do-commit-content.md)(mimeType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html), file: [File](https://developer.android.com/reference/kotlin/java/io/File.html))<br>Send a sticker file to a InputConnectionCompat |
| [doFallbackCommitContent](do-fallback-commit-content.md) | [androidJvm]<br>private suspend fun [doFallbackCommitContent](do-fallback-commit-content.md)(file: [File](https://developer.android.com/reference/kotlin/java/io/File.html))<br>In the event that a mimetype is unsupported by a InputConnectionCompat (looking at you, Signal) create a temporary png and send that. In the event that png is not supported, alert the user. |
| [isCommitContentSupported](is-commit-content-supported.md) | [androidJvm]<br>private fun [isCommitContentSupported](is-commit-content-supported.md)(editorInfo: [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?, mimeType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Check if the sticker is supported by the receiver |
| [sendSticker](send-sticker.md) | [androidJvm]<br>fun [sendSticker](send-sticker.md)(file: [File](https://developer.android.com/reference/kotlin/java/io/File.html))<br>TODO |
## Properties
| Name | Summary |
|---|---|
| [compatCache](compat-cache.md) | [androidJvm]<br>private val [compatCache](compat-cache.md): [Cache](../-cache/index.md)<br>: used to track previous x converted compat stickers |
| [context](context.md) | [androidJvm]<br>private val [context](context.md): [Context](https://developer.android.com/reference/kotlin/android/content/Context.html)<br>: application baseContext |
| [currentInputConnection](current-input-connection.md) | [androidJvm]<br>private val [currentInputConnection](current-input-connection.md): [InputConnection](https://developer.android.com/reference/kotlin/android/view/inputmethod/InputConnection.html)?<br>: the currentInputConnection. i.e. the input field that the keyboard is going to send a sticker to |
| [currentInputEditorInfo](current-input-editor-info.md) | [androidJvm]<br>private val [currentInputEditorInfo](current-input-editor-info.md): [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?<br>: currentInputEditorInfo. i.e. info on the input field that the keyboard is going to send a sticker to |
| [imageLoader](image-loader.md) | [androidJvm]<br>private val [imageLoader](image-loader.md): ImageLoader<br>: coil imageLoader object used to convert a sticker file to a drawable ready for writing to a compat sticker |
| [internalDir](internal-dir.md) | [androidJvm]<br>private val [internalDir](internal-dir.md): [File](https://developer.android.com/reference/kotlin/java/io/File.html)<br>: the internal /stickers directory used when creating a compat sticker |
| [supportedMimes](supported-mimes.md) | [androidJvm]<br>private val [supportedMimes](supported-mimes.md): [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt; |
| [toaster](toaster.md) | [androidJvm]<br>private val [toaster](toaster.md): [Toaster](../-toaster/index.md)<br>: an instance of Toaster (used to store an error state for later reporting to the user) |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[internalDir](internal-dir.md)
# internalDir
[androidJvm]\
private val [internalDir](internal-dir.md): [File](https://developer.android.com/reference/kotlin/java/io/File.html)

View File

@ -0,0 +1,21 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[isCommitContentSupported](is-commit-content-supported.md)
# isCommitContentSupported
[androidJvm]\
private fun [isCommitContentSupported](is-commit-content-supported.md)(editorInfo: [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?, mimeType: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Check if the sticker is supported by the receiver
#### Return
boolean - is the mimetype supported?
## Parameters
androidJvm
| | |
|---|---|
| editorInfo | : EditorInfo - the editor/ receiver |
| mimeType | : String - the image mimetype |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[supportedMimes](supported-mimes.md)
# supportedMimes
[androidJvm]\
private val [supportedMimes](supported-mimes.md): [List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt;

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[StickerSender](index.md)/[toaster](toaster.md)
# toaster
[androidJvm]\
private val [toaster](toaster.md): [Toaster](../-toaster/index.md)

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[Toaster](index.md)/[context](context.md)
# context
[androidJvm]\
private val [context](context.md): [Context](https://developer.android.com/reference/kotlin/android/content/Context.html)

View File

@ -20,3 +20,10 @@ The Toaster class provides a simplified interface to android.widget.Toast. Pass
| [setState](set-state.md) | [androidJvm]<br>fun [setState](set-state.md)(state: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html))<br>Set the state to some integer value |
| [toast](toast.md) | [androidJvm]<br>fun [toast](toast.md)(string: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html))<br>Call toaster.toast with some string to always create a toast notification. Context is set when Toaster is instantiated. Duration is determined based on text length |
| [toastOnState](toast-on-state.md) | [androidJvm]<br>fun [toastOnState](toast-on-state.md)(strings: [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)&lt;[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)&gt;)<br>Call toaster.toastOnState with an array of messages to create a toast notification. Context is set when Toaster is instantiated. Duration is determined based on text length. The message is selected based on the state (which can be set in a callback function or elsewhere |
## Properties
| Name | Summary |
|---|---|
| [context](context.md) | [androidJvm]<br>private val [context](context.md): [Context](https://developer.android.com/reference/kotlin/android/content/Context.html)<br>: android.content.Context. e.g. baseContext |
| [state](state.md) | [androidJvm]<br>private var [state](state.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0 |

View File

@ -0,0 +1,6 @@
//[app](../../../index.md)/[com.fredhappyface.ewesticker](../index.md)/[Toaster](index.md)/[state](state.md)
# state
[androidJvm]\
private var [state](state.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 0

View File

@ -9,8 +9,15 @@
| [Cache](-cache/index.md) | [androidJvm]<br>class [Cache](-cache/index.md)(size: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html))<br>Basically this behaved like an ordered set with some maximum capacity. When this capacity is exceeded an element is removed from the start |
| [ImageKeyboard](-image-keyboard/index.md) | [androidJvm]<br>class [ImageKeyboard](-image-keyboard/index.md) : [InputMethodService](https://developer.android.com/reference/kotlin/android/inputmethodservice/InputMethodService.html)<br>ImageKeyboard class inherits from the InputMethodService class - provides the keyboard functionality |
| [MainActivity](-main-activity/index.md) | [androidJvm]<br>class [MainActivity](-main-activity/index.md) : [AppCompatActivity](https://developer.android.com/reference/kotlin/androidx/appcompat/app/AppCompatActivity.html)<br>MainActivity class inherits from the AppCompatActivity class - provides the settings view |
| [StickerImporter](-sticker-importer/index.md) | [androidJvm]<br>class [StickerImporter](-sticker-importer/index.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), toaster: [Toaster](-toaster/index.md))<br>TODO |
| [StickerImporter](-sticker-importer/index.md) | [androidJvm]<br>class [StickerImporter](-sticker-importer/index.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), toaster: [Toaster](-toaster/index.md))<br>The StickerImporter class includes a helper function to import stickers from a user-selected stickerDirPath (see importStickers). The class requires the application baseContext and an instance of Toaster (in turn requiring the application baseContext) |
| [StickerPack](-sticker-pack/index.md) | [androidJvm]<br>class [StickerPack](-sticker-pack/index.md)(packDir: [File](https://developer.android.com/reference/kotlin/java/io/File.html))<br>Helper class to provide pack-related information A "Pack" is informally represented as a File |
| [StickerSender](-sticker-sender/index.md) | [androidJvm]<br>class [StickerSender](-sticker-sender/index.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), toaster: [Toaster](-toaster/index.md), internalDir: [File](https://developer.android.com/reference/kotlin/java/io/File.html), currentInputConnection: [InputConnection](https://developer.android.com/reference/kotlin/android/view/inputmethod/InputConnection.html)?, currentInputEditorInfo: [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?, compatCache: [Cache](-cache/index.md), imageLoader: ImageLoader)<br>TODO |
| [StickerSender](-sticker-sender/index.md) | [androidJvm]<br>class [StickerSender](-sticker-sender/index.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html), toaster: [Toaster](-toaster/index.md), internalDir: [File](https://developer.android.com/reference/kotlin/java/io/File.html), currentInputConnection: [InputConnection](https://developer.android.com/reference/kotlin/android/view/inputmethod/InputConnection.html)?, currentInputEditorInfo: [EditorInfo](https://developer.android.com/reference/kotlin/android/view/inputmethod/EditorInfo.html)?, compatCache: [Cache](-cache/index.md), imageLoader: ImageLoader)<br>The StickerSender Class used to contain all of the methods used for sending a sticker to an InputConnection |
| [Toaster](-toaster/index.md) | [androidJvm]<br>class [Toaster](-toaster/index.md)(context: [Context](https://developer.android.com/reference/kotlin/android/content/Context.html))<br>The Toaster class provides a simplified interface to android.widget.Toast. Pass in the android.content.Context to the constructor and call the 'toast' function (others as below) toaster.state keeps track of an error state or similar. |
| [Utils](-utils/index.md) | [androidJvm]<br>object [Utils](-utils/index.md)<br>Class to provide utils that are shared across ewesticker. |
## Properties
| Name | Summary |
|---|---|
| [MAX_FILES](-m-a-x_-f-i-l-e-s.md) | [androidJvm]<br>private const val [MAX_FILES](-m-a-x_-f-i-l-e-s.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 4096 |
| [MAX_PACK_SIZE](-m-a-x_-p-a-c-k_-s-i-z-e.md) | [androidJvm]<br>private const val [MAX_PACK_SIZE](-m-a-x_-p-a-c-k_-s-i-z-e.md): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) = 128 |

View File

@ -9,8 +9,8 @@ sticker collection.
- [Get it on F-Droid](#get-it-on-f-droid)
- [Get it on Google Play](#get-it-on-google-play)
- [Download the APK](#download-the-apk)
- [Step 3 - Select Directory with EweSticker (and wait...)](#step-3---select-directory-with-ewesticker-and-wait)
- [Step 4 - Activate the keyboard](#step-4---activate-the-keyboard)
- [Step 3 - Activate the keyboard](#step-3---activate-the-keyboard)
- [Step 4 - Select Directory with EweSticker (and wait...)](#step-4---select-directory-with-ewesticker-and-wait)
- [Step 5 - Send Stickers in your favourite apps](#step-5---send-stickers-in-your-favourite-apps)
## Step 1 - Create Sticker Directory (and transfer to device)
@ -42,7 +42,7 @@ is **4096**
1. Open the F-Droid app
2. Search for EweSticker
**Or**
or
[<img src="../../readme-assets/badges/f-droid-download.png"
alt="Get it on F-Droid" height="80">](https://f-droid.org/en/packages/com.fredhappyface.ewesticker/)
@ -55,7 +55,7 @@ then download/ install
1. Open the Google Play app
2. Search for EweSticker
**Or**
or
[<img src="../../readme-assets/badges/google-play-download.png"
alt="Get it on Google Play" height="80">](https://play.google.com/store/apps/details?id=com.fredhappyface.ewesticker)
@ -69,36 +69,39 @@ then download/ install
2. Select the debug or release APK depending on your preference. Note that the
filenames are in the form: com.fredhappyface.ewesticker-(version)-(debug|release).apk
**Or**
or
[<img src="../../readme-assets/badges/direct-apk-download.png" alt="Direct apk
download" height="80">](../../releases)
Navigate to the releases page by clicking on the badge above.
## Step 3 - Select Directory with EweSticker (and wait...)
## Step 3 - Activate the keyboard
1. Click the "LAUNCH SETTINGS" button
<img src="assets/screenshot-1.png" alt="Step 3.1" width="300">
2. Toggle EweSticker on
<img src="assets/step3.png" alt="Step 3" width="300">
## Step 4 - Select Directory with EweSticker (and wait...)
1. Click the "CHOOSE STICKER SOURCE DIRECTORY" button
<img src="assets/step3.png" alt="Step 3.1" width="300">
<img src="assets/screenshot-1.png" alt="Step 4.1" width="300">
2. Select the sticker directory created in step 1
<img src="assets/step3_2.png" alt="Step 3.2" width="300">
## Step 4 - Activate the keyboard
- Search 'keyboard' in settings and select 'On-screen keyboard', then '+ Manage
on-screen keyboards' and toggle EweSticker on.
<img src="assets/step4.png" alt="Step 4" width="300">
<img src="assets/screenshot-2.png" alt="Step 4.2" width="300">
## Step 5 - Send Stickers in your favourite apps
1. Tap the keyboard switcher icon and select EweSticker
<img src="assets/step5.png" alt="Step 5" width="300">
<img src="assets/screenshot-3.png" alt="Step 5" width="300">
2. Find and send a sticker of your choosing
<img src="assets/step5_2.png" alt="Step 5" width="300">
<img src="assets/screenshot-4.png" alt="Step 5.2" width="300">

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB