Skip to content

Commit

Permalink
♻️ Refactor profile button and edit steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Hogu59 committed Mar 3, 2025
1 parent 376dee3 commit fd2f1cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,15 @@ class EditStepsFragment : Fragment() {
}

EditStepsEvent.ExitEvent -> {
// 나가기
findNavController().navigateUp()
}

EditStepsEvent.TempSaveEvent -> {
// 임시저장
viewModel.saveData()
Toast.makeText(requireContext(), "임시저장되었습니다.", Toast.LENGTH_SHORT).show()
}

EditStepsEvent.OnFetchComplete -> {
// 데이터 로딩 완료
println("EditStepsFragment : ${args.sequence}")
binding.vpStepMaking.setCurrentItem(args.sequence - 1, false)
}
Expand All @@ -106,7 +103,6 @@ class EditStepsFragment : Fragment() {
}

viewModel.steps.observe(viewLifecycleOwner) { steps ->
println("EditStepsFragment : $steps")
editStepsAdapter.submitList(steps)
binding.vpStepMaking.setCurrentItem(args.sequence - 1, false)
}
Expand Down
51 changes: 1 addition & 50 deletions android/app/src/main/res/layout/item_profile_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,13 @@
name="settings"
type="String" />

<variable
name="followList"
type="String" />

<variable
name="commentList"
type="String" />


<variable
name="profileButtonClickListener"
type="net.pengcook.android.presentation.profile.ProfileButtonClickListener" />
</data>

<LinearLayout
android:paddingHorizontal="8dp"
android:paddingHorizontal="1dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
Expand Down Expand Up @@ -72,45 +63,5 @@
tools:text="Next" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="12dp">

<TextView
android:id="@+id/btn_follows"
style="@style/BasicButton.RadiusButton.ThinButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="@{() -> profileButtonClickListener.onFollowListBtnClick()}"
android:paddingVertical="8dp"
android:text="@{followList}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Next" />

<View
android:layout_width="8dp"
android:layout_height="8dp" />

<TextView
android:id="@+id/btn_comments"
style="@style/BasicButton.RadiusButton.ThinButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="@{() -> profileButtonClickListener.onCommentListBtnClick()}"
android:paddingVertical="8dp"
android:text="@{commentList}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Next" />

</LinearLayout>
</LinearLayout>
</layout>

0 comments on commit fd2f1cf

Please sign in to comment.