Skip to content

Instantly share code, notes, and snippets.

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),
//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
// Интерфейс, который торчит из микросервиса.
// Методы дергуются при маршрутизации из приложения.
interface PostController {
suspend fun createPost(): Post
suspend fun readPost(id: UUID): Post?
suspend fun updatePost(post: Post): Boolean
suspend fun deletePost(id: UUID): Boolean
}
// Общая модель данных поста.