<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DeepaShreeMulay</title>
    <description>The latest articles on DEV Community by DeepaShreeMulay (@deepashreemulay).</description>
    <link>https://dev.to/deepashreemulay</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1173060%2F2c300938-0409-4970-9569-36a187cc904d.png</url>
      <title>DEV Community: DeepaShreeMulay</title>
      <link>https://dev.to/deepashreemulay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deepashreemulay"/>
    <language>en</language>
    <item>
      <title>ListView</title>
      <dc:creator>DeepaShreeMulay</dc:creator>
      <pubDate>Thu, 12 Oct 2023 10:19:14 +0000</pubDate>
      <link>https://dev.to/deepashreemulay/listview-15ma</link>
      <guid>https://dev.to/deepashreemulay/listview-15ma</guid>
      <description>&lt;p&gt;You can build a ListView that listens to a &lt;strong&gt;LiveData&lt;/strong&gt; observer to get and update its items by using the state composable, the List composable, and the &lt;strong&gt;&lt;em&gt;remember { liveData() }&lt;/em&gt;&lt;/strong&gt; function.&lt;/p&gt;

&lt;p&gt;Here’s an example of how to build a ListView that listens to a &lt;strong&gt;LiveData&lt;/strong&gt; observer to get and update its items:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;val viewModel = ViewModelProvider(this).get(MyViewModel::class.java)
val data = remember { viewModel.liveData }

@Composable
fun MyListView() {
    state(data) { items -&amp;gt;
        List(items) { item -&amp;gt;
            Text(item.name)
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, you can create a &lt;strong&gt;ViewModel&lt;/strong&gt; instance, and use &lt;strong&gt;&lt;em&gt;remember { liveData }&lt;/em&gt;&lt;/strong&gt; to get the &lt;strong&gt;LiveData&lt;/strong&gt; from the viewModel and then use &lt;strong&gt;state&lt;/strong&gt; to observe it.&lt;/p&gt;

&lt;p&gt;The state composable is used to observe the &lt;strong&gt;LiveData&lt;/strong&gt; object, and the List composable is used to display the items in the &lt;strong&gt;LiveData&lt;/strong&gt; object.&lt;/p&gt;

&lt;p&gt;The List composable takes a list of items as input, and a lambda function that is used to define how each item in the list should be displayed.&lt;/p&gt;

</description>
      <category>android</category>
      <category>androiddev</category>
      <category>jetpackcompose</category>
    </item>
    <item>
      <title>MutableState</title>
      <dc:creator>DeepaShreeMulay</dc:creator>
      <pubDate>Thu, 12 Oct 2023 09:51:25 +0000</pubDate>
      <link>https://dev.to/deepashreemulay/mutablestate-20oo</link>
      <guid>https://dev.to/deepashreemulay/mutablestate-20oo</guid>
      <description>&lt;p&gt;In Jetpack Compose, &lt;strong&gt;&lt;em&gt;mutableState()&lt;/em&gt;&lt;/strong&gt; is a function that is used to create a mutable state object in which you can store and manage data that is used by a composable function. This function allows you to change the value of the state object, which will trigger a recomposition of the UI, updating the UI elements that are affected by the change.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;&lt;strong&gt;mutableState()&lt;/strong&gt;&lt;/em&gt; function takes an initial value as an argument and returns a MutableState object, which has two properties:&lt;/p&gt;

&lt;p&gt;The current value of the state object.&lt;br&gt;
A setter function that can be used to change the value of the state object.&lt;br&gt;
Here’s an example of how to use &lt;strong&gt;&lt;em&gt;mutableState()&lt;/em&gt;&lt;/strong&gt; to create a counter that can be incremented or decremented:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;val count = mutableState(0)

@Composable
fun Counter() {
    Column {
        Text("Count: ${count.value}")
        Button(onClick = { count.value-- }) {
            Text("-")
        }
        Button(onClick = { count.value++ }) {
            Text("+")
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;strong&gt;count&lt;/strong&gt; variable is created using the &lt;strong&gt;&lt;em&gt;mutableState()&lt;/em&gt;&lt;/strong&gt; function, with an initial value of 0. The &lt;strong&gt;Counter&lt;/strong&gt; composable function displays the current value of the count, and two buttons that can be used to decrement or increment the count.&lt;/p&gt;

&lt;p&gt;It’s important to note that mutableState should be used with care, it’s best practice to use it only when you want to change something in the UI based on the user interaction and not for any other purpose.&lt;/p&gt;

&lt;p&gt;Also, if the state is not used in the composable, the recomposition will not happen, and it could lead to some performance issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remember&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Jetpack Compose, &lt;strong&gt;&lt;em&gt;remember { mutableState() }&lt;/em&gt;&lt;/strong&gt; is a function that is used to create a mutable state object that is remembered across different compositions. This means that the state object is not recreated every time the composable function is recomposed, and its value is retained between compositions.&lt;/p&gt;

&lt;p&gt;When a composable function is recomposed, the state objects that are created within the function are also recreated, which can lead to unnecessary work and performance issues. By using &lt;em&gt;&lt;strong&gt;remember { mutableState() }&lt;/strong&gt;&lt;/em&gt;, you can ensure that the state object is only created once and its value is retained between compositions.&lt;/p&gt;

&lt;p&gt;Here’s an example of how to use &lt;strong&gt;&lt;em&gt;remember { mutableState() }&lt;/em&gt;&lt;/strong&gt; to create a counter that can be incremented or decremented:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;val count = remember { mutableState(0) }

@Composable
fun Counter() {
    Column {
        Text("Count: ${count.value}")
        Button(onClick = { count.value-- }) {
            Text("-")
        }
        Button(onClick = { count.value++ }) {
            Text("+")
        }
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;strong&gt;count&lt;/strong&gt; variable is created using &lt;em&gt;&lt;strong&gt;remember { mutableState() }&lt;/strong&gt;&lt;/em&gt;, with an initial value of 0. The &lt;strong&gt;Counter&lt;/strong&gt; composable function displays the current value of the count, and two buttons that can be used to decrement or increment the count.&lt;/p&gt;

&lt;p&gt;It’s important to note that using &lt;strong&gt;&lt;em&gt;remember { mutableState() }&lt;/em&gt;&lt;/strong&gt; is only necessary when a composable function is recomposed multiple times and the state object is used in the composable function. If the state object is not used in the composable function, it will not have any impact on the performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LiveData&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can listen to &lt;strong&gt;LiveData&lt;/strong&gt; by using the &lt;strong&gt;&lt;em&gt;remember { liveData() }&lt;/em&gt;&lt;/strong&gt; function and the state composable.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;&lt;em&gt;remember { liveData() }&lt;/em&gt;&lt;/strong&gt; function is used to create a &lt;strong&gt;LiveData&lt;/strong&gt; object that is remembered across different compositions. This means that the &lt;strong&gt;LiveData&lt;/strong&gt; object is not recreated every time the composable function is recomposed, and its value is retained between compositions.&lt;/p&gt;

&lt;p&gt;The state composable is used to observe the &lt;strong&gt;LiveData&lt;/strong&gt; object and to update the UI when the value of the &lt;strong&gt;LiveData&lt;/strong&gt; object changes.&lt;/p&gt;

&lt;p&gt;Here’s an example of how to use &lt;strong&gt;&lt;em&gt;remember { liveData() }&lt;/em&gt;&lt;/strong&gt; and the state composable to listen to a &lt;strong&gt;LiveData&lt;/strong&gt; object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;val data = remember { liveData(initialValue = "Hello World") }

@Composable
fun MyText() {
    state(data) { value -&amp;gt;
        Text(value)
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;strong&gt;data&lt;/strong&gt; variable is created using &lt;strong&gt;&lt;em&gt;remember { liveData() }&lt;/em&gt;&lt;/strong&gt;, with an initial value of “Hello World”. The &lt;strong&gt;MyText&lt;/strong&gt; composable function uses the &lt;strong&gt;state&lt;/strong&gt; composable to observe the data variable, which is a &lt;strong&gt;LiveData&lt;/strong&gt; object, and updates the UI with the latest value of the &lt;strong&gt;LiveData&lt;/strong&gt; object.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Annotations</title>
      <dc:creator>DeepaShreeMulay</dc:creator>
      <pubDate>Mon, 09 Oct 2023 12:25:09 +0000</pubDate>
      <link>https://dev.to/deepashreemulay/annotations-2ncc</link>
      <guid>https://dev.to/deepashreemulay/annotations-2ncc</guid>
      <description>&lt;p&gt;Jetpack Compose has several annotations that are used to provide additional functionality or to improve the development process.&lt;/p&gt;

&lt;p&gt;Here are some of the most commonly used annotations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;@Composable:&lt;/strong&gt; This annotation is used to mark a function as a composable. It tells the compiler that the function can be used in the composition of the UI.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Composable
fun MyButton() {
    Button(
        onClick = { /* Perform action */ },
        text = "Click me!"
    )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;@Preview:&lt;/strong&gt; This annotation is used to create a preview of a composable function in the Android Studio design editor. It allows developers to see the results of their code changes in the editor, without having to run the app on a device or emulator.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Preview(name = "My Button Preview")
@Composable
fun MyButtonPreview() {
    MyButton()
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;@Model:&lt;/strong&gt; This annotation is used to mark a data class as a model for a composable function. It tells the compiler that the data class should be used as the source of truth for the composable function.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Model
data class MyData(var text: String)

@Composable
fun MyText(data: MyData) {
    Text(data.text)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;@ExperimentalCoroutinesApi:&lt;/strong&gt; This annotation is used to indicate that the code uses coroutines that are considered experimental. This annotation should be used when using the async and await functions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@ExperimentalCoroutinesApi
fun myFunction() {
    GlobalScope.launch {
        // Coroutine code here
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are just a few examples of the annotations that Jetpack Compose provides, and there are many other annotations that you can use depending on your needs.&lt;/p&gt;

&lt;p&gt;It’s important to note that the use of some annotations may change between versions and it’s better to check the official documentation before using them.&lt;/p&gt;

</description>
      <category>android</category>
      <category>jetpackcompose</category>
    </item>
    <item>
      <title>Modifiers</title>
      <dc:creator>DeepaShreeMulay</dc:creator>
      <pubDate>Mon, 09 Oct 2023 07:36:23 +0000</pubDate>
      <link>https://dev.to/deepashreemulay/modifiers-23ml</link>
      <guid>https://dev.to/deepashreemulay/modifiers-23ml</guid>
      <description>&lt;p&gt;In Jetpack Compose, modifiers are objects that are used to change the appearance or behavior of UI elements. They are applied to composable functions using the modifier parameter. Modifiers can be used to change the layout, size, position, and other properties of UI elements.&lt;/p&gt;

&lt;p&gt;Here are some of the main properties of modifiers in Jetpack Compose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Layout:&lt;/strong&gt; Modifiers can be used to change the layout of UI elements, such as padding, margin, and alignment.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text("Hello World",
    modifier = Modifier.padding(16.dp)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Size:&lt;/strong&gt; Modifiers can be used to change the size of UI elements, such as width, height, and aspect ratio.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Image(
    asset = image,
    modifier = Modifier.preferredHeight(200.dp)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Position:&lt;/strong&gt; Modifiers can be used to change the position of UI elements, such as x and y coordinates.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text("Hello World",
    modifier = Modifier.offset(x = 16.dp, y = 32.dp)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Visibility:&lt;/strong&gt;
Modifiers can be used to control the visibility of UI elements, such as hiding or showing elements.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text("Hello World",
    modifier = Modifier.visibility(visible = true)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Background:&lt;/strong&gt; Modifiers can be used to add background color, shapes and images to UI elements.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Surface(color = Color.Yellow, shape = RoundedCornerShape(10.dp)) {
    Text("Hello World")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clickable:&lt;/strong&gt; Modifiers can be used to make a UI element clickable and perform an action when clicked.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Button(
    onClick = { /* Perform action */ },
    text = "Click me!"
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are just a few examples of the properties that modifiers can have, and there are many other properties and functions that you can use depending on your needs. Modifiers can be combined in different ways to create complex UI elements with different properties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Modifiers can be combined to create complex UI elements with different properties. The order in which modifiers are applied can affect the final result.&lt;/p&gt;

&lt;p&gt;For example, you might want to add a padding to a UI element and then add a border to that element. In this case, you have to apply the padding modifier first and then the border modifier.&lt;/p&gt;

&lt;p&gt;Here’s an example of how to combine the padding and border modifiers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text("Hello World",
    modifier = Modifier.padding(16.dp)
            .border(4.dp, Color.Red)
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code applies a padding of 16dp to the Text composable and then adds a border of 4dp with a red color. If you switch the order of Modifiers in the above examples, the result will be different, so you have to be careful when combining modifiers.&lt;/p&gt;

&lt;p&gt;Modifiers can be also combined with + sign as well, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;val padding = Modifier.padding(16.dp)
val border = Modifier.border(4.dp, Color.Red)
Text("Hello World",
    modifier = padding + border
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>android</category>
      <category>jetpackcompose</category>
    </item>
    <item>
      <title>Main Layouts</title>
      <dc:creator>DeepaShreeMulay</dc:creator>
      <pubDate>Tue, 03 Oct 2023 09:51:51 +0000</pubDate>
      <link>https://dev.to/deepashreemulay/main-layouts-101m</link>
      <guid>https://dev.to/deepashreemulay/main-layouts-101m</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PV7LMc5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzgk5c4gkpjvxb4qohzk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PV7LMc5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzgk5c4gkpjvxb4qohzk.png" alt="Image description" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Column:&lt;/strong&gt; used to stack UI elements vertically. Each child element is placed below the previous one. It takes a list of children and a modifier as input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Column(
    modifier = Modifier.fillMaxWidth().padding(16.dp),
    verticalArrangement = Arrangement.Center,
    horizontalGravity = Alignment.CenterHorizontally
) {
    Button(
        onClick = { /* Perform action */ },
        text = "Click me!"
    )
    Text("Hello World")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Row:&lt;/strong&gt; used to stack UI elements horizontally. Each child element is placed next to the previous one. It takes a list of children and a modifier as input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Row(
    modifier = Modifier.fillMaxWidth().padding(16.dp),
    verticalArrangement = Arrangement.Center,
    horizontalGravity = Alignment.CenterHorizontally
) {
    Button(
        onClick = { /* Perform action */ },
        text = "Click me!"
    )
    Text("Hello World")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Box:&lt;/strong&gt; stacks its children on top of each other. The stacking order is defined by the order in which the children are called within the Box declaration, with the first child positioned at the bottom of the stack. It doesn’t have a background color or shape. It takes a list of children and a modifier as input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Box(modifier = Modifier.padding(16.dp)) {
    Text("Hello World")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Surface:&lt;/strong&gt; used to create a container for other UI elements. It adds a background color or an image to the container and can also have a defined shape. It takes a child element and a modifier as input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Surface(color = Color.Yellow, shape = RoundedCornerShape(10.dp)) {
    Text("Hello World")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Card:&lt;/strong&gt; used to create a container with a background color and a defined shape, usually with a shadow. It takes a child element and a modifier as input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Card(elevation = 8.dp) {
    Text("Hello World")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scaffold:&lt;/strong&gt; used to create the basic structure of an app, such as a top app bar, bottom navigation bar, and a floating action button. It takes a child element and a modifier as input.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scaffold(
    topBar = { 
        TopAppBar(title = { Text("My App") })
    },
    floatingActionButton = {
        FloatingActionButton(
            onClick = { /* Perform action */ },
            icon = { Icon(Icons.Filled.Add) }
        )
    },
    bodyContent = { 
        Text("Hello World")
    }
)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List:&lt;/strong&gt; used to create a scrolling list of items. It takes a list of data and a lambda function as input. The lambda function is used to define how each item in the list should be displayed.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;List(data) { item -&amp;gt;
    Text(item.name)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please note that these are basic examples and you can customize the layout and its functionality as per your requirement.&lt;/p&gt;

</description>
      <category>android</category>
      <category>jetpackcompose</category>
    </item>
    <item>
      <title>Composables</title>
      <dc:creator>DeepaShreeMulay</dc:creator>
      <pubDate>Tue, 03 Oct 2023 09:38:50 +0000</pubDate>
      <link>https://dev.to/deepashreemulay/composables-43m4</link>
      <guid>https://dev.to/deepashreemulay/composables-43m4</guid>
      <description>&lt;p&gt;A composable function is annotated with the @Composable annotation, which tells the compiler that this function can be used in the composition of the UI.&lt;/p&gt;

&lt;p&gt;When a composable function is called, it creates a new composition scope. Inside this scope, other composable functions can be called, allowing for the creation of nested UI elements. This is similar to how a layout XML file defines nested views.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Composable
fun MyButton() {
    Column(
        modifier = Modifier.fillMaxWidth().padding(16.dp),
        verticalArrangement = Arrangement.Center,
        horizontalGravity = Alignment.CenterHorizontally
    ) {
        Button(
            onClick = { /* Perform action */ },
            modifier = Modifier.padding(8.dp),
            text = "Click me!"
        )
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, in the previous code sample, the MyButton function is a composable function, which describes a button UI element. It takes no inputs, but it returns a description of a button that can be rendered on the screen. The button is created by calling the Button composable, which is provided by the Jetpack Compose library.&lt;/p&gt;

&lt;p&gt;Composable functions can also take inputs, such as data or parameters. These inputs can be used to customize the UI elements that are created.&lt;/p&gt;

</description>
      <category>android</category>
      <category>jetpackcompose</category>
    </item>
    <item>
      <title>Jetpack Compose</title>
      <dc:creator>DeepaShreeMulay</dc:creator>
      <pubDate>Fri, 29 Sep 2023 11:18:39 +0000</pubDate>
      <link>https://dev.to/deepashreemulay/jetpack-compose-41fi</link>
      <guid>https://dev.to/deepashreemulay/jetpack-compose-41fi</guid>
      <description>&lt;p&gt;Jetpack Compose is a modern toolkit for building user interfaces in Android. It is a reactive and declarative framework that simplifies the process of creating and managing UI elements, and allows for a more efficient and flexible way to build apps. Jetpack Compose allows developers to create UI elements using simple, expressive code and eliminates the need for complex layout XML files. It also offers built-in support for animations, accessibility, and other advanced features.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Composable
fun MyButton() {
    Column(
        modifier = Modifier.fillMaxWidth().padding(16.dp),
        verticalArrangement = Arrangement.Center,
        horizontalGravity = Alignment.CenterHorizontally
    ) {
        Button(
            onClick = { /* Perform action */ },
            modifier = Modifier.padding(8.dp),
            text = "Click me!"
        )
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code sample creates a button that is centered within a column, with a padding of 16 dp around the column, and 8 dp around the button. The button’s text is set to “Click me!” and when the button is clicked, it will perform an action.&lt;/p&gt;

&lt;p&gt;You can use this button inside your compose function and can apply any customize you want for example you can change the text color by adding MaterialTheme.typography() and passing your textColor.&lt;/p&gt;

</description>
      <category>android</category>
      <category>jetpackcompose</category>
    </item>
  </channel>
</rss>
