mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-1397 Design | Secondary & warning buttons (#84)
This commit is contained in:
parent
327e8a67e2
commit
e215506f74
10 changed files with 7 additions and 17 deletions
|
@ -158,9 +158,7 @@ fun ButtonSecondary(
|
|||
val interactionSource = remember { MutableInteractionSource() }
|
||||
val isPressed = interactionSource.collectIsPressedAsState()
|
||||
val backgroundColor =
|
||||
if (isPressed.value) colorResource(id = R.color.shape_transparent) else colorResource(
|
||||
id = R.color.background_primary
|
||||
)
|
||||
if (isPressed.value) colorResource(id = R.color.shape_transparent) else Color.Transparent
|
||||
val borderColor = if (enabled) colorResource(id = R.color.shape_primary) else colorResource(
|
||||
id = R.color.shape_secondary
|
||||
)
|
||||
|
@ -175,7 +173,7 @@ fun ButtonSecondary(
|
|||
colors = ButtonDefaults.buttonColors(
|
||||
backgroundColor = backgroundColor,
|
||||
contentColor = colorResource(id = R.color.text_primary),
|
||||
disabledBackgroundColor = colorResource(id = R.color.background_primary),
|
||||
disabledBackgroundColor = Color.Transparent,
|
||||
disabledContentColor = colorResource(id = R.color.text_tertiary)
|
||||
),
|
||||
modifier = modifier
|
||||
|
@ -216,7 +214,7 @@ fun ButtonWarning(
|
|||
shape = RoundedCornerShape(size.cornerSize),
|
||||
border = BorderStroke(width = 1.dp, color = borderColor),
|
||||
colors = ButtonDefaults.buttonColors(
|
||||
backgroundColor = colorResource(id = R.color.background_primary),
|
||||
backgroundColor = Color.Transparent,
|
||||
contentColor = contentColor
|
||||
),
|
||||
modifier = modifier
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_secondary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_large_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="true" android:state_pressed="false">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_large_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_secondary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_medium_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="true" android:state_pressed="false">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_medium_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_secondary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_small_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="true" android:state_pressed="false">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_small_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
|
|
|
@ -4,14 +4,12 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_secondary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_xsmall_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_enabled="true" android:state_pressed="false">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_xsmall_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_large_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -4,7 +4,6 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_medium_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -4,7 +4,6 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_small_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -4,7 +4,6 @@
|
|||
<shape android:shape="rectangle">
|
||||
<stroke android:color="@color/shape_primary" android:width="1dp"/>
|
||||
<corners android:radius="@dimen/button_xsmall_corner" />
|
||||
<solid android:color="@color/background_primary" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -36,6 +36,10 @@
|
|||
<activity android:name=".StyleActivity" />
|
||||
<activity android:name=".MainActivity" />
|
||||
<activity android:name=".StyleToolbarActivity"/>
|
||||
|
||||
<meta-data
|
||||
android:name="io.sentry.dsn"
|
||||
android:value="" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
Loading…
Add table
Add a link
Reference in a new issue