Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.testandroid
- import android.os.Bundle
- import android.text.Html
- import androidx.activity.ComponentActivity
- import androidx.activity.compose.setContent
- import androidx.compose.foundation.Image
- import androidx.compose.foundation.layout.Column
- import androidx.compose.foundation.layout.Row
- import androidx.compose.material3.Button
- import androidx.compose.material3.Text
- import androidx.compose.runtime.Composable
- import androidx.compose.ui.graphics.Color
- import androidx.compose.ui.res.painterResource
- import androidx.compose.ui.unit.sp
- class MainActivity : ComponentActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContent {
- MinimalGreeting(
- name = "Mondo"
- )
- }
- }
- }
- @Composable
- fun MinimalGreeting(name: String) {
- Column {
- Row {
- Button(
- onClick = {
- }
- ) {
- Text(text = "Clicca qui", fontSize = 25.sp)
- }
- Text(
- text = " Ciao $name!",
- color = Color.Red,
- fontSize = 40.sp
- )
- }
- Image(
- painter = painterResource(id = R.drawable.foca),
- contentDescription = "Cutie"
- )
- Image(
- painter = painterResource(id = R.drawable.ciuco),
- contentDescription = "Cutie"
- )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment