Skip to content

Commit

Permalink
[Design/#1] 코드 입력 textInputLayout 디자인
Browse files Browse the repository at this point in the history
  • Loading branch information
ss99x2002 committed Jul 3, 2023
1 parent 25ae9fe commit 5aeb372
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main/res/color/sel_invite_code_input_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/grey_300" android:state_focused="true"/>
<item android:color="@color/grey_300" android:state_hovered="true"/>
<item android:color="@color/grey_300" android:state_hovered="true"/>
</selector>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_close.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
android:fillColor="#FF0000"/>
</vector>
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_invite_code.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
style="@style/TextInputLayoutStyle"
android:layout_marginHorizontal="24dp"
app:hintEnabled="false"
android:textSize="16sp"
Expand Down
24 changes: 24 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="toolbar">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">?attr/actionBarSize</item>
<item name="android:background">@color/white</item>
<item name="contentInsetStart">0dp</item>
</style>

<style name="TextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">

<!--FilledBox일 경우 밑줄 색상, OutlinedBox일 경우 테두리 색상-->
<item name="boxStrokeColor">@color/sel_invite_code_input_layout</item>
<!--Error-->
<item name="errorEnabled">true</item>
<item name="colorError">@color/error_red</item>
<item name="errorIconDrawable">@drawable/ic_close</item>
<item name="boxStrokeErrorColor">@color/error_red</item>
<item name="errorTextAppearance">@style/ErrorTextAppearance</item>
<!--Radius-->
<item name="boxCornerRadiusTopStart">50dp</item>
<item name="boxCornerRadiusTopEnd">50dp</item>
<item name="boxCornerRadiusBottomEnd">50dp</item>
<item name="boxCornerRadiusBottomStart">50dp</item>
</style>

<style name="ErrorTextAppearance">
<item name="android:textStyle">normal</item>
<item name="android:includeFontPadding">false</item>
<item name="android:textSize">16sp</item>
</style>
</resources>

0 comments on commit 5aeb372

Please sign in to comment.