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
| @Composable | |
| fun MarqueeScreen() { | |
| Box( | |
| modifier = Modifier.fillMaxSize(), | |
| contentAlignment = Alignment.Center | |
| ) { | |
| val edgeWidth = 80.dp | |
| Text( | |
| "the quick brown fox jumped over the lazy dogs", | |
| Modifier |
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
| @Composable | |
| fun DraggableBoxScreen(modifier: Modifier = Modifier) { | |
| Box(modifier = Modifier.fillMaxSize()){ | |
| DraggableBox() | |
| } | |
| } | |
| @Composable | |
| fun DraggableBox() { | |
| var offset by remember { mutableStateOf(Offset.Zero) } |
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
| @Composable | |
| fun ExpandableTextScreen() { | |
| Box( | |
| modifier = Modifier.fillMaxSize(), | |
| contentAlignment = Alignment.Center, | |
| ) { | |
| ExpandableText( | |
| text = "This is an example of a very long text and this can take a lot of " + | |
| "space in this text." | |
| ) |
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
| @Composable | |
| fun <T> SwipeToDeleteContainer( | |
| item: T, | |
| onDelete: (T) -> Unit, | |
| animationDuration: Int = 500, | |
| content: @Composable (T) -> Unit | |
| ) { | |
| var isRemoved by remember { | |
| mutableStateOf(false) | |
| } |
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
| import androidx.compose.foundation.ExperimentalFoundationApi | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.fillMaxWidth | |
| import androidx.compose.foundation.layout.padding | |
| import androidx.compose.foundation.lazy.LazyColumn | |
| import androidx.compose.foundation.lazy.items | |
| import androidx.compose.material3.ExperimentalMaterial3Api | |
| import androidx.compose.material3.Scaffold | |
| import androidx.compose.material3.Text | |
| import androidx.compose.material3.TopAppBar |
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
| import androidx.compose.animation.Animatable | |
| import androidx.compose.animation.core.Animatable | |
| import androidx.compose.animation.core.LinearEasing | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.material3.MaterialTheme | |
| import androidx.compose.material3.Text |
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
| class ColorCardWidget extends StatelessWidget { | |
| const ColorCardWidget({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| color: ColorWidget.of(context)!.color, | |
| height: 500, | |
| width: 500, | |
| ); |
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
| class HomeScreen extends StatefulWidget { | |
| const HomeScreen({super.key}); | |
| @override | |
| State<HomeScreen> createState() => _HomeScreenState(); | |
| } | |
| class _HomeScreenState extends State<HomeScreen> { | |
| Color color = Colors.red; |