Skip to content

Commit

Permalink
Merge pull request #112 from Team-Sopetit/feature/#110-all-back-butto…
Browse files Browse the repository at this point in the history
…n-touch-change

#110 [fix] 버튼 터치영역 수정 및 웹사이트 연결
  • Loading branch information
minemi00 authored Jan 19, 2024
2 parents 2a93b51 + dfd27ee commit 77dc151
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 22 deletions.
10 changes: 10 additions & 0 deletions app/src/main/java/com/sopetit/softie/ui/main/home/HomeFragment.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sopetit.softie.ui.main.home

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.View
import androidx.fragment.app.viewModels
Expand Down Expand Up @@ -63,6 +64,7 @@ class HomeFragment : BindingFragment<FragmentHomeBinding>(R.layout.fragment_home
setClickBear()
setClickDaily()
setClickHappy()
moveToPaymentView()
}

private fun setClickSetting() {
Expand Down Expand Up @@ -91,6 +93,14 @@ class HomeFragment : BindingFragment<FragmentHomeBinding>(R.layout.fragment_home
}
}

private fun moveToPaymentView() {
binding.ivHomeMoney.setOnClickListener {
startActivity(
Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.my_page_policy_link)))
)
}
}

private fun checkCottonRemain(cottonType: Cotton) {
val isCottonRemain: (Int) -> Boolean = { cotton -> cotton > RUN_OUT }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.sopetit.softie.ui.setting

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.View
import androidx.lifecycle.ViewModelProvider
import com.sopetit.softie.R
import com.sopetit.softie.databinding.FragmentSettingInitBinding
import com.sopetit.softie.ui.login.LoginActivity
import com.sopetit.softie.ui.setting.SettingActivity.Companion.USER_EXIT
import com.sopetit.softie.ui.setting.SettingActivity.Companion.USER_SECURITY
import com.sopetit.softie.util.OriginalBottomSheet.Companion.BOTTOM_SHEET_TAG
import com.sopetit.softie.util.binding.BindingBottomSheet
import com.sopetit.softie.util.binding.BindingFragment
Expand All @@ -32,24 +32,55 @@ class SettingInitFragment :
clickUserSecurity()
clickLogOut()
clickUserExit()
clickUserSecurity()
clickDocument()
clickGuide()
clickFeedback()
}

private fun clickUserSecurity() {
binding.clSettingInitUserSecurity.setOnClickListener {
viewModel.setSettingFragment(USER_SECURITY)
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.setting_user_security_link))
)
)
}
}

private fun clickDocument() {
// TODO 서비스 이용 약관
binding.clSettingInitDocument.setOnClickListener {
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.setting_service_document_link))
)
)
}
}

private fun clickGuide() {
// TODO 서비스 이용 가이드
binding.clSettingInitGuide.setOnClickListener {
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.setting_service_guide_link))
)
)
}
}

private fun clickFeedback() {
// TODO 피드백
binding.clSettingInitFeedback.setOnClickListener {
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse(getString(R.string.setting_feedback_link))
)
)
}
}

private fun clickLogOut() {
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/activity_daily_routine_add.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:layout_marginTop="16dp"
android:background="@drawable/ic_daily_back"
android:scaleType="centerCrop"
android:padding="7dp"
android:src="@drawable/ic_daily_back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_happy_add_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:layout_marginTop="16dp"
android:background="@drawable/ic_back_arrow"
android:padding="7dp"
android:src="@drawable/ic_back_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_happy_add_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:layout_marginTop="16dp"
android:padding="7dp"
android:src="@drawable/ic_back_arrow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_setting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:background="@android:color/transparent"
android:layout_marginStart="18dp"
android:layout_marginTop="16dp"
android:padding="5dp"
android:padding="7dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" />

Expand Down
25 changes: 14 additions & 11 deletions app/src/main/res/layout/fragment_daily_routine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_daily_routine_name">

<ImageButton
<ImageView
android:id="@+id/btn_daily_routine_radio_first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginEnd="21dp"
android:background="@drawable/selector_daily_edit"
android:layout_marginTop="13dp"
android:layout_marginEnd="14dp"
android:padding="7dp"
android:src="@drawable/selector_daily_edit"
android:visibility="@{viewModel.isDeleteView ? View.VISIBLE: View.INVISIBLE}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down Expand Up @@ -165,13 +166,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_daily_routine_first">

<ImageButton
<ImageView
android:id="@+id/btn_daily_routine_radio_second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginEnd="21dp"
android:background="@drawable/selector_daily_edit"
android:layout_marginTop="13dp"
android:layout_marginEnd="14dp"
android:padding="7dp"
android:src="@drawable/selector_daily_edit"
android:visibility="@{viewModel.isDeleteView ? View.VISIBLE: View.INVISIBLE}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down Expand Up @@ -262,12 +264,13 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cl_daily_routine_second">

<ImageButton
<ImageView
android:id="@+id/btn_daily_routine_radio_third"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginEnd="21dp"
android:layout_marginTop="13dp"
android:layout_marginEnd="14dp"
android:padding="7dp"
android:background="@drawable/selector_daily_edit"
android:visibility="@{viewModel.isDeleteView ? View.VISIBLE: View.INVISIBLE}"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
android:id="@+id/iv_home_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginEnd="22dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="15dp"
android:padding="7dp"
android:src="@drawable/ic_home_settings"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -51,8 +52,9 @@
android:id="@+id/iv_home_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginEnd="8dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="6dp"
android:padding="7dp"
android:src="@drawable/ic_home_money"
app:layout_constraintEnd_toStartOf="@id/iv_home_setting"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
<string name="user_logout_content">“잠시만 안녕.. 다음에 또 봐!”</string>
<string name="user_logout_back">취소</string>
<string name="user_logout_exit">로그아웃 할래</string>
<string name="setting_user_security_link">https://softie-link.notion.site/c2435b30cfdb45db82f91cae6d1cc789</string>
<string name="setting_service_document_link">https://softie-link.notion.site/b8b8c02805924f2ababd4de7b2306d64?pvs=4</string>
<string name="setting_service_guide_link">https://softie-link.notion.site/6a65faa32923410a84ff6a63c47cf752</string>
<string name="setting_feedback_link">https://docs.google.com/forms/d/e/1FAIpQLSfEtF_qWDu9mI1IcEBPTWsoBVCwPa0wunQK600EcjOMbz8upQ/viewform</string>


<!-- bottom sheet -->
<string name="bottom_sheet_title">정말 로그아웃할까요?</string>
Expand Down Expand Up @@ -148,6 +153,7 @@
<string name="home_happiness_cotton_btn">행복 솜뭉치 주기</string>
<string name="home_daily_cotton_btn">솜뭉치 주기</string>
<string name="splash_service_introduce">친구와 함께 하는 일상 속 작은 습관</string>
<string name="my_page_policy_link">https://softie-link.notion.site/92fc58e36cf448eca66ee47e1c50bee8</string>

<!-- daily routine add -->
<string name="daily_routine_add_question">데일리 루틴을 추가할까요?</string>
Expand Down

0 comments on commit 77dc151

Please sign in to comment.