0% found this document useful (0 votes)
46 views2 pages

Android Business Card UI Example

The document contains an Android application code for a business card screen using Jetpack Compose. It defines a main activity that sets the content to a composable function displaying a profile image, name, job title, and contact information. The layout is structured with a background color and various spacing elements for visual appeal.

Uploaded by

hungabc2206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views2 pages

Android Business Card UI Example

The document contains an Android application code for a business card screen using Jetpack Compose. It defines a main activity that sets the content to a composable function displaying a profile image, name, job title, and contact information. The layout is structured with a background color and various spacing elements for visual appeal.

Uploaded by

hungabc2206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

package [Link].

rebc

import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link].*
import [Link]
import [Link].material3.*
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]

class MainActivity : ComponentActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
[Link](savedInstanceState)
setContent {
BusinessCardScreen()
}
}
}

@Composable
fun BusinessCardScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.background(Color(0xFFD2E2CB)), // Background color
horizontalAlignment = [Link]
){
Spacer(modifier = [Link]([Link]))

// Profile Image
Image(
painter = painterResource(id = [Link].android_logo),
contentDescription = "Profile Picture",
modifier = Modifier
.size([Link])
.clip(RectangleShape)
.background(Color(0xFF1D2352))
)

Spacer(modifier = [Link]([Link]))

// Name
Text(
text = "Jennifer Doe",
fontSize = [Link],
textAlign = [Link],
color = [Link]
)

// Job Title
Text(
text = "Android Developer Extraordinaire",
fontSize = [Link],
fontWeight = [Link],
textAlign = [Link],
color = Color(0xFF296F2F),
modifier = [Link](top = [Link])
)

Spacer(modifier = [Link]([Link]))

// Contact Info Section


ContactInfoRow([Link].phone_ic, "+11 (123) 444 555 666")
ContactInfoRow([Link].share_ic, "@AndroidDev")
ContactInfoRow([Link].email_ic, "[Link]@[Link]")
}
}

@Composable
fun ContactInfoRow(iconResId: Int, text: String) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = [Link], vertical = [Link]),
verticalAlignment = [Link]
){
Image(
painter = painterResource(id = iconResId),
contentDescription = null,
modifier = [Link]([Link])
)
Spacer(modifier = [Link]([Link]))
Text(text = text, fontSize = [Link], color = [Link])
}
}

You might also like