-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π :: release v1.0.0
- Loading branch information
Showing
35 changed files
with
1,290 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
235 changes: 235 additions & 0 deletions
235
app/src/main/java/com/semicolon/semicolondesign/TestActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
package com.semicolon.semicolondesign | ||
|
||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
import android.widget.Toast | ||
import androidx.activity.compose.setContent | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.rememberScrollState | ||
import androidx.compose.foundation.verticalScroll | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.unit.dp | ||
import com.semicolon.design.button.* | ||
|
||
class TestActivity : AppCompatActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
Column( | ||
modifier = Modifier.verticalScroll(rememberScrollState()), | ||
verticalArrangement = Arrangement.spacedBy(8.dp), | ||
horizontalAlignment = Alignment.CenterHorizontally | ||
) { | ||
DefaultFillButton(text = "λ²νΌ") { makeToast("κΈ°λ³Έ κ½μ°¬ λ²νΌ λλ¦Ό") } | ||
DefaultFillButton(text = "λ²νΌ", isEnabled = false) {} | ||
ColoredFillButton(text = "λ²νΌ") { makeToast("μ»¬λ¬ κ½μ°¬ λ²νΌ λλ¦Ό") } | ||
ColoredFillButton(text = "λ²νΌ", isEnabled = false) {} | ||
|
||
DefaultLargeButton(text = "λ²νΌ") { makeToast("κΈ°λ³Έ ν° λ²νΌ λλ¦Ό") } | ||
DefaultLargeButton(text = "λ²νΌ", isEnabled = false) {} | ||
ColoredLargeButton(text = "λ²νΌ") { makeToast("μκΉ ν° λ²νΌ λλ¦Ό") } | ||
ColoredLargeButton(text = "λ²νΌ", isEnabled = false) {} | ||
PaleColoredLargeButton(text = "λ²νΌ") { makeToast("μ°ν ν° λ²νΌ λλ¦Ό") } | ||
PaleColoredLargeButton(text = "λ²νΌ", isEnabled = false) {} | ||
OutlinedLargeButton(text = "λ²νΌ") { makeToast("ν λ리 ν° λ²νΌ λλ¦Ό") } | ||
OutlinedLargeButton(text = "λ²νΌ", isEnabled = false) {} | ||
|
||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
DefaultMediumButton(text = "λ²νΌ") { makeToast("κΈ°λ³Έ μ€κ° λ²νΌ λλ¦Ό") } | ||
DefaultMediumButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
ColoredMediumButton(text = "λ²νΌ") { makeToast("μκΉ μ€κ° λ²νΌ λλ¦Ό") } | ||
ColoredMediumButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
PaleColoredMediumButton(text = "λ²νΌ") { makeToast("μ°ν μ€κ° λ²νΌ λλ¦Ό") } | ||
PaleColoredMediumButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
OutlinedMediumButton(text = "λ²νΌ") { makeToast("ν λ리 μ€κ° λ²νΌ λλ¦Ό") } | ||
OutlinedMediumButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
|
||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
ClearDefaultSmallButton(text = "λ²νΌ") { makeToast("λ°°κ²½x κΈ°λ³Έ μμ λ²νΌ λλ¦Ό") } | ||
ClearDefaultSmallButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
ClearDefaultSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.LEFT | ||
) { | ||
makeToast("μΌμͺ½ μμ΄μ½ λ°°κ²½x κΈ°λ³Έ μμ λ²νΌ λλ¦Ό") | ||
} | ||
ClearDefaultSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.RIGHT | ||
) { | ||
makeToast("μ€λ₯Έμͺ½ μμ΄μ½ λ°°κ²½x κΈ°λ³Έ μμ λ²νΌ λλ¦Ό") | ||
} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
ClearColoredSmallButton(text = "λ²νΌ") { makeToast("λ°°κ²½x μκΉ μμ λ²νΌ λλ¦Ό") } | ||
ClearColoredSmallButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
ClearColoredSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.LEFT | ||
) { | ||
makeToast("μΌμͺ½ μμ΄μ½ λ°°κ²½x μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
ClearColoredSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.RIGHT | ||
) { | ||
makeToast("μ€λ₯Έμͺ½ μμ΄μ½ λ°°κ²½x μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
LinkSmallButton(text = "λ²νΌ") { makeToast("λ§ν¬ μμ λ²νΌ λλ¦Ό") } | ||
LinkSmallButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
LinkSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_north_east), | ||
iconPosition = IconPosition.LEFT | ||
) { | ||
makeToast("μΌμͺ½ μμ΄μ½ λ§ν¬ μμ λ²νΌ λλ¦Ό") | ||
} | ||
LinkSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_north_east), | ||
iconPosition = IconPosition.RIGHT | ||
) { | ||
makeToast("μ€λ₯Έμͺ½ μμ΄μ½ λ§ν¬ μμ λ²νΌ λλ¦Ό") | ||
} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
DefaultSmallButton(text = "λ²νΌ") { makeToast("κΈ°λ³Έ μμ λ²νΌ λλ¦Ό") } | ||
DefaultSmallButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
DefaultSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.LEFT | ||
) { | ||
makeToast("μΌμͺ½ μμ΄μ½ κΈ°λ³Έ μμ λ²νΌ λλ¦Ό") | ||
} | ||
DefaultSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.RIGHT | ||
) { | ||
makeToast("μ€λ₯Έμͺ½ μμ΄μ½ κΈ°λ³Έ μμ λ²νΌ λλ¦Ό") | ||
} | ||
DefaultSmallButton( | ||
text = "λ²νΌ", | ||
isLoading = true | ||
) { | ||
makeToast("λ‘λ©μ€ κΈ°λ³Έ μμ λ²νΌ λλ¦Ό") | ||
} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
ColoredSmallButton(text = "λ²νΌ") { makeToast("μκΉ μμ λ²νΌ λλ¦Ό") } | ||
ColoredSmallButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
ColoredSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.LEFT | ||
) { | ||
makeToast("μΌμͺ½ μμ΄μ½ μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
ColoredSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.RIGHT | ||
) { | ||
makeToast("μ€λ₯Έμͺ½ μμ΄μ½ μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
ColoredSmallButton( | ||
text = "λ²νΌ", | ||
isLoading = true | ||
) { | ||
makeToast("λ‘λ©μ€ μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
PaleColoredSmallButton(text = "λ²νΌ") { makeToast("μ°ν μκΉ μμ λ²νΌ λλ¦Ό") } | ||
PaleColoredSmallButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
PaleColoredSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.LEFT | ||
) { | ||
makeToast("μΌμͺ½ μμ΄μ½ μ°ν μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
PaleColoredSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.RIGHT | ||
) { | ||
makeToast("μ€λ₯Έμͺ½ μμ΄μ½ μ°ν μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
PaleColoredSmallButton( | ||
text = "λ²νΌ", | ||
isLoading = true | ||
) { | ||
makeToast("λ‘λ©μ€ μ°ν μκΉ μμ λ²νΌ λλ¦Ό") | ||
} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
OutlinedSmallButton(text = "λ²νΌ") { makeToast("ν λ리 μμ λ²νΌ λλ¦Ό") } | ||
OutlinedSmallButton(text = "λ²νΌ", isEnabled = false) {} | ||
} | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
OutlinedSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.LEFT | ||
) { | ||
makeToast("μΌμͺ½ μμ΄μ½ ν λ리 μμ λ²νΌ λλ¦Ό") | ||
} | ||
OutlinedSmallButton( | ||
text = "λ²νΌ", | ||
icon = painterResource(id = R.drawable.ic_favorite), | ||
iconPosition = IconPosition.RIGHT | ||
) { | ||
makeToast("μ€λ₯Έμͺ½ μμ΄μ½ ν λ리 μμ λ²νΌ λλ¦Ό") | ||
} | ||
OutlinedSmallButton( | ||
text = "λ²νΌ", | ||
isLoading = true | ||
) { | ||
makeToast("λ‘λ©μ€ ν λ리 μμ λ²νΌ λλ¦Ό") | ||
} | ||
} | ||
|
||
ToggleSwitch() | ||
ToggleButton(items = arrayOf("λ²νΌ", "λ²νΌ")) | ||
ToggleButton(items = arrayOf("λ²νΌ", "λ²νΌ", "λ²νΌ")) | ||
ToggleButton(items = arrayOf("λ²νΌ", "λ²νΌ", "λ²νΌ", "λ²νΌ")) | ||
ToggleButton(items = arrayOf()) | ||
} | ||
} | ||
} | ||
|
||
private fun makeToast(message: String) = | ||
Toast.makeText(this, message, Toast.LENGTH_SHORT).show() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M9,5v2h6.59L4,18.59L5.41,20L17,8.41V15h2V5H9z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.