Skip to content

Commit 0db7adb

Browse files
committed
documentation improvements and styles tidy up
1 parent 43c33d4 commit 0db7adb

8 files changed

Lines changed: 10 additions & 27 deletions

File tree

app/src/main/java/com/fredhappyface/ewesticker/StickerImporter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class StickerImporter(
2929

3030
/**
3131
* Used by the ACTION_OPEN_DOCUMENT_TREE handler function to copy stickers from a
32-
* stickerDirPath to the appplication internal storage for access later on by the
32+
* stickerDirPath to the application internal storage for access later on by the
3333
* keyboard
3434
*
35-
* @param stickerDirPath a URI to the stikers directory to import into EweSticker
35+
* @param stickerDirPath a URI to the stickers directory to import into EweSticker
3636
*/
3737
fun importStickers(stickerDirPath: String): Int {
3838
File(this.context.filesDir, "stickers").deleteRecursively()

app/src/main/java/com/fredhappyface/ewesticker/StickerSender.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ class StickerSender(
5050
.filter { isCommitContentSupported(this.currentInputEditorInfo, it) }
5151

5252
/**
53-
* TODO
53+
* Start the process of sending a sticker when the sticker is tapped in the
54+
* keyboard. If the sticker type is not supported by the InputConnection then
55+
* doFallbackCommitContent, otherwise doCommitContent
5456
*
5557
* @param file
5658
*/

app/src/main/res/values-v27/styles.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,5 @@
2323
<item name="colorOnSurface">@color/fg</item>
2424
<item name="shapeAppearanceMediumComponent">@style/ShapeAppearance.App.MediumComponent
2525
</item>
26-
<item name="snackbarStyle">@style/Widget.App.Snackbar</item>
27-
<item name="snackbarTextViewStyle">@style/Widget.App.Snackbar.TextView</item>
2826
</style>
2927
</resources>

app/src/main/res/values/styles.xml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,6 @@
2121
<item name="colorOnSurface">@color/fg</item>
2222
<item name="shapeAppearanceMediumComponent">@style/ShapeAppearance.App.MediumComponent
2323
</item>
24-
<item name="snackbarStyle">@style/Widget.App.Snackbar</item>
25-
<item name="snackbarTextViewStyle">@style/Widget.App.Snackbar.TextView</item>
26-
</style>
27-
28-
<style name="Widget.App.Snackbar" parent="Widget.MaterialComponents.Snackbar">
29-
<item name="materialThemeOverlay">@style/ThemeOverlay.App.Snackbar</item>
30-
<item name="actionTextColorAlpha">1</item>
31-
</style>
32-
33-
<style name="Widget.App.Snackbar.TextView" parent="Widget.MaterialComponents.Snackbar.TextView">
34-
<item name="android:textColor">@color/onAccent</item>
35-
<item name="android:textSize">@dimen/text_size_body</item>
36-
<item name="android:fontFamily">@font/firasans</item>
37-
</style>
38-
39-
<style name="ThemeOverlay.App.Snackbar" parent="">
40-
<item name="colorOnSurface">@color/accent</item>
4124
</style>
4225

4326
<style name="ShapeAppearance.App.MediumComponent" parent="ShapeAppearance.MaterialComponents.MediumComponent">

documentation/reference/app/com.fredhappyface.ewesticker/-sticker-importer/import-stickers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
[androidJvm]\
66
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)
77

8-
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
8+
Used by the ACTION_OPEN_DOCUMENT_TREE handler function to copy stickers from a stickerDirPath to the application internal storage for access later on by the keyboard
99

1010
## Parameters
1111

1212
androidJvm
1313

1414
| | |
1515
|---|---|
16-
| stickerDirPath | a URI to the stikers directory to import into EweSticker |
16+
| stickerDirPath | a URI to the stickers directory to import into EweSticker |

documentation/reference/app/com.fredhappyface.ewesticker/-sticker-importer/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The StickerImporter class includes a helper function to import stickers from a u
1919
|---|---|
2020
| [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 |
2121
| [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 |
22-
| [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 |
22+
| [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 application internal storage for access later on by the keyboard |
2323

2424
## Properties
2525

documentation/reference/app/com.fredhappyface.ewesticker/-sticker-sender/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The StickerSender Class used to contain all of the methods used for sending a st
2020
| [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 |
2121
| [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. |
2222
| [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 |
23-
| [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 |
23+
| [sendSticker](send-sticker.md) | [androidJvm]<br>fun [sendSticker](send-sticker.md)(file: [File](https://developer.android.com/reference/kotlin/java/io/File.html))<br>Start the process of sending a sticker when the sticker is tapped in the keyboard. If the sticker type is not supported by the InputConnection then doFallbackCommitContent, otherwise doCommitContent |
2424

2525
## Properties
2626

documentation/reference/app/com.fredhappyface.ewesticker/-sticker-sender/send-sticker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[androidJvm]\
66
fun [sendSticker](send-sticker.md)(file: [File](https://developer.android.com/reference/kotlin/java/io/File.html))
77

8-
TODO
8+
Start the process of sending a sticker when the sticker is tapped in the keyboard. If the sticker type is not supported by the InputConnection then doFallbackCommitContent, otherwise doCommitContent
99

1010
## Parameters
1111

0 commit comments

Comments
 (0)