Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for SDP-SSP-Compose-Multiplatform
Mobile innovation Network
Mobile innovation Network

Posted on • Edited on

     

SDP-SSP-Compose-Multiplatform

A scalable size unit for Compose Multiplatform for Android & iOS App

Installation

Add the dependency to your build.gradle.kts file:

commonMain.dependencies {
implementation("network.chaintech:sdp-ssp-compose-multiplatform:1.0.4")
}

Enter fullscreen modeExit fullscreen mode




Usage


@Composable
fun App() = AppTheme {
Box(
modifier = Modifier
.statusBarsPadding()
.fillMaxSize()
.background(Color.White),
contentAlignment = Alignment.Center
) {
Card(
modifier = Modifier.fillMaxWidth(0.82f),
shape = RoundedCornerShape(16.sdp),
colors = CardDefaults.cardColors(Color(0xFFFBF3E8)),
) {
Column(
modifier = Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Column(
modifier = Modifier
.fillMaxWidth()
.background(Color(0xFF585DDB))
.padding(vertical = 16.sdp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Image(
modifier = Modifier
.size(80.sdp),
painter = painterResource(Res.drawable.ic_user),
contentDescription = null,
contentScale = ContentScale.FillBounds
)

                Text(                    text = "Emily Dounger",                    fontSize = 16.ssp,                    color = Color.White,                    fontWeight = FontWeight.Bold,                    modifier = Modifier.padding(top = 12.sdp)                )            }            Text(                text = "Hi there \uD83D\uDC4B , We are Boards to share initital Goals and ideas.",                fontSize = 14.ssp,                textAlign = TextAlign.Center,                color = Color.Black,                lineHeight = 18.ssp,                fontWeight = FontWeight.Bold,                modifier = Modifier.padding(top = 30.sdp).padding(horizontal = 20.sdp)            )            Button(                onClick = {},                colors = ButtonDefaults.buttonColors(Color(0xFF007AFF)),                modifier = Modifier.padding(top = 24.sdp, bottom = 20.sdp)                    .padding(horizontal = 20.sdp).fillMaxWidth().height(40.sdp)            ) {                Text(text = "Say Hello", fontSize = 16.ssp)            }        }    }}
Enter fullscreen modeExit fullscreen mode

}

Enter fullscreen modeExit fullscreen mode




Android

  • with usingdp

Android dp

  • with usingsdp

Android sdp

iOS

  • with usingdp

iOS dp

  • with usingsdp

iOS sdp

Desktop

  • with usingsdp

Desktop sdp

https://github.com/ChainTechNetwork/sdp-ssp-compose-multiplatform.git

Happy coding ❤

Connect with us 👇

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More fromMobile innovation Network

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp