Skip to content

Commit

Permalink
🐛 add paddings and constraints for search bars
Browse files Browse the repository at this point in the history
  • Loading branch information
kmkim2689 committed Aug 6, 2024
1 parent 8971574 commit eb7e762
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
11 changes: 7 additions & 4 deletions android/app/src/main/res/layout/item_search_bar.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<data>

Expand All @@ -17,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_radius_outlined"
android:padding="12dp">
android:paddingHorizontal="12dp">

<ImageView
android:id="@+id/iv_search"
Expand All @@ -38,11 +39,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_search"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:background="@android:color/transparent"
android:inputType="text"
style="@style/Body.Regular.B1"
android:layout_marginStart="12dp"
android:maxLines="1"/>
android:padding="12dp"
android:maxLines="1"
tools:hint="Search"/>

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
4 changes: 2 additions & 2 deletions android/app/src/main/res/layout/item_search_bar_gray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_radius_filled"
android:padding="12dp">
android:paddingHorizontal="12dp">

<ImageView
android:id="@+id/iv_search"
Expand All @@ -42,7 +42,7 @@
android:background="@android:color/transparent"
android:inputType="text"
style="@style/Body.Medium.B1"
android:layout_marginStart="12dp"
android:padding="12dp"
android:maxLines="1"
tools:hint="Search"/>

Expand Down
6 changes: 4 additions & 2 deletions android/app/src/main/res/layout/item_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="@{() -> settingMenuItemClickListener.onSettingMenuItemClick(menuItem)}"
android:padding="12dp">
android:paddingHorizontal="12dp">

<ImageView
android:id="@+id/iv_setting_item"
Expand All @@ -37,8 +37,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
android:padding="12dp"
android:text="@{menuItem.title}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/iv_setting_item"
tools:text="Menu" />
Expand Down

0 comments on commit eb7e762

Please sign in to comment.