Yorkie

ExamplesSimultaneous Cursors Android

Simultaneous Cursors Android

This is an example of real-time collaborative Simultaneous Cursors using Yorkie Android SDK.

    MainActivity.kt
    1package com.example.simultaneouscursors
    2
    3import android.os.Bundle
    4import androidx.activity.ComponentActivity
    5import androidx.activity.compose.setContent
    6import androidx.activity.enableEdgeToEdge
    7import androidx.compose.foundation.layout.fillMaxSize
    8import androidx.compose.material.MaterialTheme
    9import androidx.compose.material.Surface
    10import androidx.compose.ui.Modifier
    11import androidx.navigation.compose.rememberNavController
    12import com.example.simultaneouscursors.ui.SimultaneousCursorsAppHost
    13import com.example.simultaneouscursors.ui.theme.SimultaneousCursorsTheme
    14
    15class MainActivity : ComponentActivity() {
    16
    17 override fun onCreate(savedInstanceState: Bundle?) {
    18 super.onCreate(savedInstanceState)
    19 enableEdgeToEdge()
    20 setContent {
    21 SimultaneousCursorsTheme {
    22 Surface(
    23 modifier = Modifier
    24 .fillMaxSize(),
    25 color = MaterialTheme.colors.background,
    26 ) {
    27 SimultaneousCursorsAppHost(navController = rememberNavController())
    28 }
    29 }
    30 }
    31 }
    32}
    GitHub
    Your browser does not support the video tag.