Skip to content

Commit feab115

Browse files
committed
feat : textinputedittext 스타일 적용
1 parent b73fbe8 commit feab115

File tree

6 files changed

+41
-42
lines changed

6 files changed

+41
-42
lines changed

presentation/src/main/java/com/stop/ui/map/MapFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class MapFragment : Fragment(), MapHandler {
207207

208208
private fun setViewVisibility() {
209209
with(binding) {
210-
layoutSearch.visibility = mapUIVisibility
210+
textViewSearch.visibility = mapUIVisibility
211211
layoutCompass.visibility = mapUIVisibility
212212
layoutCurrent.visibility = mapUIVisibility
213213
}

presentation/src/main/res/layout/fragment_map.xml

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
android:layout_width="wrap_content"
2424
android:layout_height="wrap_content"
2525
android:orientation="vertical"
26-
app:layout_constraintGuide_begin="15dp" />
26+
app:layout_constraintGuide_begin="16dp" />
2727

2828
<androidx.constraintlayout.widget.Guideline
2929
android:id="@+id/guideline_end"
3030
android:layout_width="wrap_content"
3131
android:layout_height="wrap_content"
3232
android:orientation="vertical"
33-
app:layout_constraintGuide_end="15dp" />
33+
app:layout_constraintGuide_end="16dp" />
3434

3535
<androidx.constraintlayout.widget.Guideline
3636
android:id="@+id/guideline_top"
3737
android:layout_width="wrap_content"
3838
android:layout_height="wrap_content"
3939
android:orientation="horizontal"
40-
app:layout_constraintGuide_begin="55dp" />
40+
app:layout_constraintGuide_begin="35dp" />
4141

4242
<androidx.constraintlayout.widget.Guideline
4343
android:id="@+id/guideline_bottom"
@@ -55,6 +55,23 @@
5555
app:layout_constraintStart_toStartOf="parent"
5656
app:layout_constraintTop_toTopOf="parent" />
5757

58+
<TextView
59+
android:id="@+id/text_view_search"
60+
android:layout_width="0dp"
61+
android:layout_height="50dp"
62+
android:background="@drawable/background_search"
63+
android:drawablePadding="15dp"
64+
android:elevation="15dp"
65+
android:gravity="center_vertical"
66+
android:padding="8dp"
67+
android:text="@string/search_hint"
68+
android:textColor="@color/hint_text_color"
69+
android:textSize="17sp"
70+
app:drawableStartCompat="@drawable/ic_search"
71+
app:layout_constraintEnd_toEndOf="@id/guideline_end"
72+
app:layout_constraintStart_toStartOf="@id/guideline_start"
73+
app:layout_constraintTop_toTopOf="@id/guideline_top" />
74+
5875
<androidx.constraintlayout.widget.ConstraintLayout
5976
android:id="@+id/layout_panel"
6077
android:layout_width="0dp"
@@ -74,39 +91,6 @@
7491

7592
</androidx.constraintlayout.widget.ConstraintLayout>
7693

77-
<androidx.constraintlayout.widget.ConstraintLayout
78-
android:id="@+id/layout_search"
79-
android:layout_width="0dp"
80-
android:layout_height="52dp"
81-
android:background="@drawable/background_search"
82-
android:elevation="15dp"
83-
app:layout_constraintEnd_toStartOf="@id/guideline_end"
84-
app:layout_constraintStart_toStartOf="@id/guideline_start"
85-
app:layout_constraintTop_toTopOf="@id/guideline_top">
86-
87-
<TextView
88-
android:id="@+id/text_view_search"
89-
android:layout_width="match_parent"
90-
android:layout_height="match_parent"
91-
android:layout_marginStart="50dp"
92-
android:layout_marginBottom="1dp"
93-
android:gravity="center_vertical"
94-
android:text="@string/search_hint"
95-
android:textColor="#808590"
96-
android:textSize="17sp" />
97-
98-
<ImageView
99-
android:id="@+id/image_view_search"
100-
android:layout_width="wrap_content"
101-
android:layout_height="wrap_content"
102-
android:layout_marginStart="15dp"
103-
app:layout_constraintBottom_toBottomOf="@id/layout_search"
104-
app:layout_constraintStart_toStartOf="@id/layout_search"
105-
app:layout_constraintTop_toTopOf="@id/layout_search"
106-
app:srcCompat="@drawable/ic_search" />
107-
108-
</androidx.constraintlayout.widget.ConstraintLayout>
109-
11094
<androidx.constraintlayout.widget.ConstraintLayout
11195
android:id="@+id/layout_compass"
11296
android:layout_width="60dp"

presentation/src/main/res/layout/fragment_place_search.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,24 @@
4242

4343
<com.google.android.material.textfield.TextInputLayout
4444
android:id="@+id/text_input_layout_place_search"
45-
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
45+
style="@style/TextInputLayoutStyle"
4646
android:layout_width="0dp"
4747
android:layout_height="wrap_content"
48+
android:theme="@style/TextInputLayoutStyle"
4849
app:endIconMode="clear_text"
4950
app:layout_constraintEnd_toEndOf="@id/guide_line_end"
5051
app:layout_constraintStart_toStartOf="@id/guide_line_start"
5152
app:layout_constraintTop_toTopOf="@id/guideline_top"
52-
app:startIconDrawable="@drawable/ic_baseline_search_24">
53+
app:startIconDrawable="@drawable/ic_search">
5354

5455
<com.google.android.material.textfield.TextInputEditText
5556
android:id="@+id/text_input_edit_text_place_search"
5657
android:layout_width="match_parent"
5758
android:layout_height="wrap_content"
58-
android:hint="@string/location_address_search_text"
59+
android:hint="@string/search_hint"
5960
android:imeOptions="actionSearch"
60-
android:inputType="text" />
61+
android:inputType="text"
62+
android:textSize="17sp" />
6163

6264
</com.google.android.material.textfield.TextInputLayout>
6365

presentation/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
<color name="main_dark_grey">#404550</color>
1515
<color name="main_light_grey">#808590</color>
1616
<color name="transparent">#00FFFFFF</color>
17+
<color name="hint_text_color">#808590</color>
1718
</resources>

presentation/src/main/res/values/strings.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<string name="current_location_text">현재위치</string>
1414
<string name="select_map_text">지도에서 선택</string>
1515
<string name="distance_km">%1$skm</string>
16-
<string name="location_address_search_text">장소, 주소 검색</string>
1716
<string name="mission_close_image_view_description">미션 종료 버튼입니다.</string>
1817
<string name="minute_and_second">%1$s:%2$s</string>
1918
<string name="number_format">%1$s%2$d</string>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<style name="TextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
5+
<item name="colorPrimary">@color/black</item>
6+
<item name="colorOnSurface">@color/black</item>
7+
<item name="boxStrokeColor">@color/black</item>
8+
9+
<item name="hintTextColor">@color/black</item>
10+
<item name="android:textColorHint">@color/hint_text_color</item>
11+
</style>
12+
13+
</resources>

0 commit comments

Comments
 (0)