Skip to content

Instantly share code, notes, and snippets.

View rahat14's full-sized avatar

Rahatul Aseaikin Shovo rahat14

View GitHub Profile
@rahat14
rahat14 / topsnackbar.kt
Created July 2, 2024 10:51
Top Snackbar In compose
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@Composable
fun MainScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colorScheme.surface),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
AnimatedBorderCard(
student?.run {
firstName == "John" &&
lastName == "Doe" &&
age == 40 &&
homeAddress == "Dhaka,Bangladesh" &&
cellPhone.orEmpty().startsWith("+880")
} ?: false
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.AsyncListDiffer
import androidx.recyclerview.widget.DiffUtil
#parse("File Header.java")