Skip to content

Instantly share code, notes, and snippets.

View MamboBryan's full-sized avatar
😊
Ubuntu

MamboBryan MamboBryan

😊
Ubuntu
View GitHub Profile
@MamboBryan
MamboBryan / valentino
Created February 10, 2023 20:05
A small gist for compose camp
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
package com.bizyback.play.circletest
/**
* The implementation of the prepare function is abstracted from the callers
*/
interface Food {
fun prepare(time: Int): String = "Preparing ${getIngredients()} as a ${this::class.simpleName} in $time minutes"
fun getIngredients(): String
}
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.paging.compose.LazyPagingItems
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.material3.CircularProgressIndicator