Skip to content

Commit

Permalink
[chore/#60] PDF 리스트 화면 뒤로가기 적용 및 폴더 화면 삭제하기 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
blueme0 committed Jun 11, 2024
1 parent 654348d commit 30c84dc
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ class ReviewFolderActivity
llBack.setOnSingleClickListener {
finish()
}

if (id != -1L) {
tvFab.text = "오답 폴더 수정하기"
etTitle.text.insert(0, title)
etContent.text.insert(0, description)
tvDownload.visibility = View.VISIBLE
empty.visibility = View.GONE
tvDelete.visibility = View.VISIBLE

tvDownload.setOnSingleClickListener {
viewModel.postMakeReviewPdf(id)
Expand All @@ -74,7 +76,9 @@ class ReviewFolderActivity
}
} else {
tvFab.text = "오답 폴더 만들기"
tvDownload.visibility = View.INVISIBLE
tvDownload.visibility = View.GONE
tvDelete.visibility = View.INVISIBLE
empty.visibility = View.VISIBLE

fab.setOnSingleClickListener {
viewModel.postNewFolder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ class ReviewPdfListActivity

private fun initListener() {
with(binding) {
tvTitle.setOnSingleClickListener {
llBack.setOnSingleClickListener {
finish()
}

tvTitle.setOnSingleClickListener {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
requestPermissions(arrayOf(Manifest.permission.POST_NOTIFICATIONS), 1)
Expand Down
31 changes: 27 additions & 4 deletions app/src/main/res/layout/activity_review_folder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
</LinearLayout>

<TextView
android:id="@+id/tv_download"
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="pdf 만들기"
android:text="삭제하기"
android:fontFamily="@font/nanumsquare_regular"
android:textColor="#000000"
android:textSize="16sp"
Expand Down Expand Up @@ -130,21 +130,44 @@
app:layout_constraintTop_toBottomOf="@id/tv_content" />

<TextView
android:id="@+id/tv_photo"
android:id="@+id/tv_download"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginHorizontal="46dp"
android:background="@drawable/shape_rect8_fill_brown"
android:textAlignment="center"
android:gravity="center"
android:text="문제 보관함에서 문제 선택하기"
android:text="pdf 만들기"
app:layout_constraintTop_toBottomOf="@id/et_content"
android:layout_marginTop="33dp"
android:fontFamily="@font/nanumsquare_bold"
android:textSize="16sp"
android:textColor="@color/white"
/>

<View
android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="23dp"
app:layout_constraintTop_toBottomOf="@id/tv_download"
/>

<TextView
android:id="@+id/tv_photo"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginHorizontal="46dp"
android:background="@drawable/shape_rect8_fill_brown"
android:textAlignment="center"
android:gravity="center"
android:text="문제 보관함에서 문제 선택하기"
app:layout_constraintTop_toBottomOf="@id/empty"
android:layout_marginTop="10dp"
android:fontFamily="@font/nanumsquare_bold"
android:textSize="16sp"
android:textColor="@color/white"
/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_problems"
android:layout_width="match_parent"
Expand Down

0 comments on commit 30c84dc

Please sign in to comment.