Skip to content

Instantly share code, notes, and snippets.

@Rokata9
Created August 17, 2020 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rokata9/a15913a33abd56f3cf69ff33cf088104 to your computer and use it in GitHub Desktop.
Save Rokata9/a15913a33abd56f3cf69ff33cf088104 to your computer and use it in GitHub Desktop.
package com.example.secondtry
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.preferredSize
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Card
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.imageResource
import androidx.compose.ui.unit.dp
@Composable
fun RoundedImage() {
Card(modifier = Modifier.preferredSize(42.dp),
shape = CircleShape,
elevation = 2.dp)
{
Image(imageResource(id = R.drawable.no_avatar),
contentScale = ContentScale.Crop,
modifier = Modifier.fillMaxSize())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment