Rich Text Editor Android
This is an example of real-time collaborative Rich Text Editor using Yorkie Android SDK.
MainActivity.kt
1package com.example.richtexteditor23import android.os.Bundle4import androidx.activity.ComponentActivity5import androidx.activity.compose.setContent6import androidx.activity.enableEdgeToEdge7import androidx.compose.foundation.layout.fillMaxSize8import androidx.compose.foundation.layout.navigationBarsPadding9import androidx.compose.foundation.layout.statusBarsPadding10import androidx.compose.material.MaterialTheme11import androidx.compose.material.Surface12import androidx.compose.ui.Modifier13import androidx.navigation.compose.rememberNavController14import com.example.richtexteditor.ui.RichTextEditorAppHost15import com.example.richtexteditor.ui.theme.RichTextEditorTheme1617class MainActivity : ComponentActivity() {18 override fun onCreate(savedInstanceState: Bundle?) {19 super.onCreate(savedInstanceState)20 enableEdgeToEdge()21 setContent {22 RichTextEditorTheme {23 Surface(24 modifier = Modifier25 .fillMaxSize()26 .statusBarsPadding()27 .navigationBarsPadding(),28 color = MaterialTheme.colors.background,29 ) {30 RichTextEditorAppHost(navController = rememberNavController())31 }32 }33 }34 }35}