Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
276 changes: 141 additions & 135 deletions app/src/main/res/layout/fragment_bottomsheet_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,151 +8,157 @@
android:padding="16dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

<LinearLayout
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="32dp"
android:layout_marginBottom="70dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints">

android:layout_height="wrap_content"
android:fillViewport="true">

<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:layout_marginBottom="70dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

LinearLayout의 부모는 NestedScrollView이므로 ConstraintLayout에서 사용되는 app:layout_constraintStart_toStartOfapp:layout_constraintTop_toTopOf 속성은 아무런 효과가 없습니다. tools:ignore="MissingConstraints"를 사용하여 경고를 무시하는 대신, 불필요한 속성들을 제거하는 것이 좋습니다.

Suggested change
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:layout_marginBottom="70dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="70dp"
android:gravity="center"
android:orientation="vertical">


<TextView
android:id="@+id/tv_name"
style="@style/H1"
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="학생식당"
android:textColor="@color/black" />

<View
android:layout_height="wrap_content">

<View
android:id="@+id/drag_handle"
android:layout_width="30dp"
android:layout_height="2dp"
android:layout_gravity="center"
android:background="@color/gray400"
android:contentDescription="@null" />

<TextView
android:id="@+id/tv_name"
style="@style/H1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="16dp"
android:textColor="@color/black"
tools:text="학생식당"/>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="24dp"
android:background="@color/gray200" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="24dp"
android:background="@color/gray200" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
android:weightSum="10">

<TextView
android:id="@+id/tv_location_info"
style="@style/Subtitle2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="@string/location"
android:textColor="@color/black" />


<TextView
android:id="@+id/tv_location"
style="@style/Body3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7"
android:gravity="end"
android:text="학생회관 3층"
android:textColor="@color/black" />

</LinearLayout>


<!-- 테두리 때문에 카드뷰 씀 -->
<androidx.cardview.widget.CardView
android:id="@+id/cv_photo"
android:layout_width="match_parent"
android:layout_height="220dp"
android:layout_marginTop="6dp"
app:cardCornerRadius="5dp">

<ImageView
android:id="@+id/iv_cafeteria_photo"
android:layout_marginBottom="12dp"
android:orientation="horizontal"
android:weightSum="10">

<TextView
android:id="@+id/tv_location_info"
style="@style/Subtitle2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="@string/location"
android:textColor="@color/black" />

<TextView
android:id="@+id/tv_location"
style="@style/Body3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7"
android:gravity="end"
android:text="학생회관 3층"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

레이아웃 미리보기용 텍스트는 android:text 대신 tools:text를 사용하는 것이 좋습니다. 이렇게 하면 앱 실행 시에는 코드에서 설정한 텍스트가 표시되고, 레이아웃 편집기에서만 미리보기 텍스트가 보이게 됩니다. tv_name 뷰와 일관성을 맞추기 위해 수정하는 것을 권장합니다.

Suggested change
android:text="학생회관 3층"
tools:text="학생회관 3층"

android:textColor="@color/black" />
</LinearLayout>

<!-- 테두리 때문에 카드뷰 씀 -->
<androidx.cardview.widget.CardView
android:id="@+id/cv_photo"
android:layout_width="match_parent"
android:layout_height="220dp"
android:layout_marginTop="6dp"
app:cardCornerRadius="5dp">

<ImageView
android:id="@+id/iv_cafeteria_photo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/img_dodam"
app:layout_constraintStart_toStartOf="@+id/iv_profile"
app:layout_constraintTop_toBottomOf="@+id/tv_review_item_comment" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

ImageView의 부모는 CardView이며, 이는 FrameLayout을 상속합니다. 따라서 ConstraintLayout에서 사용되는 app:layout_constraintStart_toStartOfapp:layout_constraintTop_toBottomOf 속성은 여기서 아무런 효과가 없습니다. 불필요한 속성이므로 제거하는 것이 좋습니다.

Suggested change
android:id="@+id/iv_cafeteria_photo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/img_dodam"
app:layout_constraintStart_toStartOf="@+id/iv_profile"
app:layout_constraintTop_toBottomOf="@+id/tv_review_item_comment" />
android:id="@+id/iv_cafeteria_photo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/img_dodam" />

</androidx.cardview.widget.CardView>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/img_dodam"
app:layout_constraintStart_toStartOf="@+id/iv_profile"
app:layout_constraintTop_toBottomOf="@+id/tv_review_item_comment" />
</androidx.cardview.widget.CardView>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:weightSum="10">

<TextView
android:id="@+id/tv_time_info"
style="@style/Subtitle2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="@string/time"
android:textColor="@color/black" />


<TextView
android:id="@+id/tv_time"
style="@style/Body3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7"
android:gravity="end"
android:text="08:10~09:20\n
천원의 아침밥, 100개 한정\n\n
11:20~14:00\n
점심\n\n
14:00~17:20\n
공간 개방"
android:textColor="@color/black" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:weightSum="10">

<TextView
android:id="@+id/tv_etc_info"
style="@style/Subtitle2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="@string/etc"
android:textColor="@color/black" />

<TextView
android:id="@+id/tv_etc"
style="@style/Body3"
android:layout_width="0dp"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:weightSum="10">

<TextView
android:id="@+id/tv_time_info"
style="@style/Subtitle2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="@string/time"
android:textColor="@color/black" />

<TextView
android:id="@+id/tv_time"
style="@style/Body3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7"
android:gravity="end"
android:text="08:10~09:20\n
천원의 아침밥, 100개 한정\n\n
11:20~14:00\n
점심\n\n
14:00~17:20\n
공간 개방"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

레이아웃 미리보기용 텍스트는 android:text 대신 tools:text를 사용하는 것이 좋습니다. 이렇게 하면 앱 실행 시에는 코드에서 설정한 텍스트가 표시되고, 레이아웃 편집기에서만 미리보기 텍스트가 보이게 됩니다.

                    tools:text="08:10~09:20
    천원의 아침밥, 100개 한정

    11:20~14:00
    점심

    14:00~17:20
    공간 개방"

android:textColor="@color/black" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="7"
android:gravity="end"
android:text="3개 코너 운영\n
뚝배기, 덮밥, 양식"
android:textColor="@color/black" />

android:layout_marginTop="30dp"
android:orientation="horizontal"
android:weightSum="10">

<TextView
android:id="@+id/tv_etc_info"
style="@style/Subtitle2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="@string/etc"
android:textColor="@color/black" />

<TextView
android:id="@+id/tv_etc"
style="@style/Body3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="7"
android:gravity="end"
android:text="3개 코너 운영\n
뚝배기, 덮밥, 양식"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

레이아웃 미리보기용 텍스트는 android:text 대신 tools:text를 사용하는 것이 좋습니다. 이렇게 하면 앱 실행 시에는 코드에서 설정한 텍스트가 표시되고, 레이아웃 편집기에서만 미리보기 텍스트가 보이게 됩니다.

                    tools:text="3개 코너 운영
    뚝배기, 덮밥, 양식"

android:textColor="@color/black" />
</LinearLayout>
</LinearLayout>

</LinearLayout>

</androidx.core.widget.NestedScrollView>
</androidx.appcompat.widget.LinearLayoutCompat>