mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2731 Vault | Enhancement | Add large plus button (#1604)
This commit is contained in:
parent
a2eaa96534
commit
a1dcdda9d6
2 changed files with 38 additions and 0 deletions
|
@ -108,6 +108,9 @@ fun VaultScreen(
|
|||
icon = item.icon
|
||||
)
|
||||
if (idx == spaces.lastIndex) {
|
||||
VaultSpaceAddCard(
|
||||
onCreateSpaceClicked = onCreateSpaceClicked
|
||||
)
|
||||
Spacer(modifier = Modifier.height(40.dp))
|
||||
}
|
||||
}
|
||||
|
@ -257,6 +260,31 @@ fun VaultSpaceCard(
|
|||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun VaultSpaceAddCard(
|
||||
onCreateSpaceClicked: () -> Unit
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 8.dp, vertical = 8.dp)
|
||||
.clip(RoundedCornerShape(20.dp))
|
||||
.background(
|
||||
color = colorResource(id = R.color.shape_tertiary),
|
||||
shape = RoundedCornerShape(20.dp)
|
||||
)
|
||||
.clickable {
|
||||
onCreateSpaceClicked()
|
||||
}
|
||||
) {
|
||||
Image(
|
||||
modifier = Modifier.align(Alignment.Center).padding(vertical = 32.dp),
|
||||
painter = painterResource(id = R.drawable.ic_vault_create_space_card_button_plus),
|
||||
contentDescription = "Plus icon"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@Preview(showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES, name = "Light Mode")
|
||||
@Preview(showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_NO, name = "Dark Mode")
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:pathData="M15.25,24.25C15.25,24.664 15.586,25 16,25C16.414,25 16.75,24.664 16.75,24.25V16.75H24.25C24.664,16.75 25,16.414 25,16C25,15.586 24.664,15.25 24.25,15.25H16.75V7.75C16.75,7.336 16.414,7 16,7C15.586,7 15.25,7.336 15.25,7.75V15.25H7.75C7.336,15.25 7,15.586 7,16C7,16.414 7.336,16.75 7.75,16.75H15.25V24.25Z"
|
||||
android:fillColor="@color/glyph_button"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
Loading…
Add table
Add a link
Reference in a new issue