Skip to content

Commit

Permalink
design : 첨부파일 제외 상세보기 뷰 디자인 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
m6z1 committed Feb 2, 2024
1 parent c4282a0 commit 285bf4a
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 56 deletions.
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/bg_radius_100dp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="100dp" />
</shape>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_popup.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="4dp"
android:height="16dp"
android:viewportWidth="4"
android:viewportHeight="16">
<path
android:pathData="M3.576,14.167C3.576,15.039 2.878,15.745 2.007,15.745C1.135,15.745 0.43,15.039 0.43,14.167C0.43,13.296 1.135,12.599 2.007,12.599C2.878,12.599 3.576,13.296 3.576,14.167ZM3.576,8C3.576,8.872 2.878,9.577 2.007,9.577C1.135,9.577 0.43,8.872 0.43,8C0.43,7.128 1.135,6.431 2.007,6.431C2.878,6.431 3.576,7.128 3.576,8ZM3.576,1.833C3.576,2.704 2.878,3.41 2.007,3.41C1.135,3.41 0.43,2.704 0.43,1.833C0.43,0.961 1.135,0.255 2.007,0.255C2.878,0.255 3.576,0.961 3.576,1.833Z"
android:fillColor="#4967E2"/>
</vector>
138 changes: 82 additions & 56 deletions app/src/main/res/layout/activity_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".ui.view.detail.DetailActivity">

<include
Expand All @@ -24,112 +25,139 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="68dp"
android:paddingHorizontal="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<TextView
android:id="@+id/detail_keyword"
style="@style/PretendardSemiBold14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_radius_100dp"
android:backgroundTint="@color/blue300"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp"
android:textColor="@color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:hint="수업" />

<ImageView
android:id="@+id/detail_popup_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="12dp"
android:src="@drawable/ic_popup"
app:layout_constraintBottom_toBottomOf="@id/detail_keyword"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/detail_keyword" />

<TextView
android:id="@+id/detail_title"
style="@style/PretendardBold16"
style="@style/PretendardSemiBold20"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="12dp"
android:hint="안녕하세ㅛ아아아ㅣㅣㄴㅇ럼ㄴ런"
android:text="@{vm.title}"
android:textColor="@color/black"
android:textColor="@color/gray600"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@id/detail_keyword" />

<TextView
android:id="@+id/detail_date"
style="@style/PretendardRegular12"
android:id="@+id/detail_writer"
style="@style/PretendardMedium14"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:gravity="end"
android:hint="손명지"
android:text="@{vm.date}"
android:textColor="@color/black"
app:layout_constraintEnd_toStartOf="@id/detail_writer"
android:textColor="@color/gray400"
app:layout_constraintStart_toStartOf="@id/detail_title"
app:layout_constraintTop_toBottomOf="@id/detail_title" />

<View
android:id="@+id/detail_writer_date_divide"
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_marginStart="12dp"
android:background="@color/gray400"
app:layout_constraintBottom_toBottomOf="@id/detail_writer"
app:layout_constraintStart_toEndOf="@id/detail_writer"
app:layout_constraintTop_toTopOf="@id/detail_writer" />

<TextView
android:id="@+id/detail_writer"
style="@style/PretendardRegular12"
android:layout_width="0dp"
android:id="@+id/detail_date"
style="@style/PretendardMedium14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="12dp"
android:gravity="end"
android:hint="2024.02.01"
android:text="@{vm.writer}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/detail_title" />
android:textColor="@color/gray400"
app:layout_constraintBottom_toBottomOf="@id/detail_writer"
app:layout_constraintStart_toEndOf="@id/detail_writer_date_divide"
app:layout_constraintTop_toTopOf="@id/detail_writer" />

<View
android:id="@+id/detail_top_line"
android:layout_width="0dp"
android:layout_height="0.5dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="#A1333232"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/detail_writer" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/detail_file_rcv"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="8dp"
android:layout_height="1dp"
android:layout_marginTop="20dp"
android:background="@color/gray300"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/detail_top_line"
tools:listitem="@layout/item_file" />

<View
android:id="@+id/detail_bot_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:background="#A1333232"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/detail_file_rcv" />
app:layout_constraintTop_toBottomOf="@id/detail_writer" />

<ScrollView
android:id="@+id/detail_scroll_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/detail_bot_line">
app:layout_constraintTop_toBottomOf="@id/detail_top_line">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
style="@style/PretendardRegular12"
style="@style/PretendardMedium16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ반갑습니다반갑스비나아럼ㄴ;렁;ㄹ넘라ㅣ;멀;ㅣㅁ너라ㅓㄴ맒ㄴ"
android:text="@{vm.content}"
android:textColor="#E81C1C1C" />
android:textColor="@color/gray500" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/detail_image_rcv"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/detail_attached_file_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp"
tools:listitem="@layout/item_image" />
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:visibility="gone">

<View
android:id="@+id/detail_bot_line"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="@color/gray300"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<!-- 서버에서 첨부 파일 받는 방법에 따라 코드 추가 예정 -->
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
Expand All @@ -151,7 +179,6 @@
android:layout_height="match_parent"
android:layout_gravity="center" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

<data>
Expand All @@ -160,5 +187,4 @@
name="vm"
type="com.dongyang.android.youdongknowme.ui.view.detail.DetailViewModel" />
</data>

</layout>

0 comments on commit 285bf4a

Please sign in to comment.