This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface HandBreadthActionHandler { | |
fun littleFingerAction() | |
fun foreFingerAction() | |
fun middleFingerAction() | |
fun ringFingerAction() | |
fun thumbAction() | |
} | |
enum class HandBreadth(val action: Function1<HandBreadthActionHandler, Unit>) { | |
LITTLE_FINGER(action = HandBreadthActionHandler::littleFingerAction), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//recyclerview list item layout xml with scrollable textview | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
xmlns:card_view="http://schemas.android.com/apk/res-auto" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:orientation="vertical" | |
> <TextView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Интерфейс, который торчит из микросервиса. | |
// Методы дергуются при маршрутизации из приложения. | |
interface PostController { | |
suspend fun createPost(): Post | |
suspend fun readPost(id: UUID): Post? | |
suspend fun updatePost(post: Post): Boolean | |
suspend fun deletePost(id: UUID): Boolean | |
} | |
// Общая модель данных поста. |