Skip to content

Commit

Permalink
fix: T-464, T-471, T-479 (#276)
Browse files Browse the repository at this point in the history
* 검색 화면 내에 현 지도에서 검색 버튼 추가

* mapper 네이밍 잘못 기입된 것 수정

* fix: T-475 닉네임에 띄어쓰기가 존재할 경우, 완료 버튼을 눌러도 응답이 없는 문제

* 현 지도에서 검색 버튼 비활성화

* 앱 버전 초기화

* fix: T-479 닉네임 수정 화면 하단 버튼이 너무 밑에 있는 문제

* fix: T-471 검색창 진입을 위해 검색창을 터치하고 나서 또 터치해야하는 문제

* fix: MapFragment 진입시 앱이 터지는 문제 해결

* fix: T-464 장소 정보 바텀 시트를 확장했을 때 바텀 시트 corner radius가 그대로인 문제

* chore: app version up
  • Loading branch information
easyhooon authored Apr 22, 2024
1 parent b914c5a commit b6e2c81
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 44 deletions.
4 changes: 2 additions & 2 deletions build-logic/src/main/kotlin/internal/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ internal object ApplicationConstants {
const val MinSdk = 24
const val TargetSdk = 34
const val CompileSdk = 34
const val VersionCode = 1
const val VersionName = "0.0.1"
const val VersionCode = 5
const val VersionName = "0.0.4"
val JavaVersion = org.gradle.api.JavaVersion.VERSION_17
const val JavaVersionAsInt = 17
}
13 changes: 13 additions & 0 deletions design-resource/src/main/res/drawable/radius_21.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Designed and developed by Wedemy 2023.
~
~ Licensed under the MIT.
~ Please see full license: https://github.com/Wedemy/eggeum-android/blob/main/LICENSE
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/shape_radius">

<corners android:radius="21dp"/>
<solid android:color="@color/white"/>
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ class MainActivity : BaseActivity() {
private fun setupDestinationChangeListener() {
navController?.addOnDestinationChangedListener { _, destination, _ ->
when (destination.id) {
R.id.fragment_home, R.id.fragment_my_account -> {
updateSystemBars(Color.TRANSPARENT)
binding.root.applyInsetter {
type(
ime = true,
statusBars = true,
navigationBars = false,
f = InsetterApplyTypeDsl::padding,
)
}
}

R.id.fragment_cafe_image_detail -> {
updateSystemBars(ContextCompat.getColor(this, us.wedemy.eggeum.android.design.R.color.muted_900))
binding.root.applyInsetter {
Expand Down Expand Up @@ -96,7 +108,7 @@ class MainActivity : BaseActivity() {
type(
ime = true,
statusBars = true,
navigationBars = false,
navigationBars = true,
f = InsetterApplyTypeDsl::padding,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,14 @@ package us.wedemy.eggeum.android.main.ui.myaccount
import android.os.Bundle
import android.view.View
import androidx.navigation.fragment.findNavController
import dev.chrisbanes.insetter.InsetterApplyTypeDsl
import dev.chrisbanes.insetter.applyInsetter
import us.wedemy.eggeum.android.common.extension.safeNavigate
import us.wedemy.eggeum.android.common.base.BaseFragment
import us.wedemy.eggeum.android.common.extension.safeNavigate
import us.wedemy.eggeum.android.main.databinding.FragmentReportCompleteBinding

class ReportCompleteFragment : BaseFragment<FragmentReportCompleteBinding>() {
override fun getViewBinding() = FragmentReportCompleteBinding.inflate(layoutInflater)

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
binding.root.applyInsetter {
type(
ime = false,
statusBars = true,
navigationBars = true,
f = InsetterApplyTypeDsl::padding,
)
}
initListener()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ import android.widget.Toast
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.insetter.InsetterApplyTypeDsl
import dev.chrisbanes.insetter.applyInsetter
import kotlinx.coroutines.launch
import us.wedemy.eggeum.android.common.base.BaseFragment
import us.wedemy.eggeum.android.common.extension.repeatOnStarted
import us.wedemy.eggeum.android.common.extension.safeNavigate
import us.wedemy.eggeum.android.common.extension.textChangesAsFlow
import us.wedemy.eggeum.android.common.base.BaseFragment
import us.wedemy.eggeum.android.main.databinding.FragmentReportBinding
import us.wedemy.eggeum.android.main.viewmodel.ReportViewModel

Expand All @@ -31,14 +29,6 @@ class ReportFragment : BaseFragment<FragmentReportBinding>() {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.root.applyInsetter {
type(
ime = false,
statusBars = false,
navigationBars = true,
f = InsetterApplyTypeDsl::padding,
)
}
initListener()
initObserver()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ import android.widget.Toast
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import dagger.hilt.android.AndroidEntryPoint
import dev.chrisbanes.insetter.InsetterApplyTypeDsl
import dev.chrisbanes.insetter.applyInsetter
import kotlinx.coroutines.launch
import us.wedemy.eggeum.android.common.extension.repeatOnStarted
import us.wedemy.eggeum.android.common.base.BaseFragment
import us.wedemy.eggeum.android.common.extension.repeatOnStarted
import us.wedemy.eggeum.android.main.R
import us.wedemy.eggeum.android.main.databinding.FragmentWithdrawBinding
import us.wedemy.eggeum.android.main.ui.MainActivity
Expand All @@ -31,14 +29,6 @@ class WithdrawFragment : BaseFragment<FragmentWithdrawBinding>() {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.root.applyInsetter {
type(
ime = false,
statusBars = false,
navigationBars = true,
f = InsetterApplyTypeDsl::padding,
)
}
initListener()
initObserver()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,30 @@ class MapFragment : BaseFragment<FragmentMapBinding>(), OnMapReadyCallback, Over
when (newState) {
BottomSheetBehavior.STATE_COLLAPSED -> {
binding.bottomSheet.apply {
fadeInView(binding.bottomSheet.ivCafeDetailHandle)
fadeOutView(binding.bottomSheet.ivCafeDetailShrink)
fadeInView(ivCafeDetailHandle)
fadeOutView(ivCafeDetailShrink)
bottomSheet.background =
ContextCompat.getDrawable(requireContext(), us.wedemy.eggeum.android.design.R.drawable.radius_21)
}
}
BottomSheetBehavior.STATE_DRAGGING -> {}
BottomSheetBehavior.STATE_EXPANDED -> {
binding.bottomSheet.apply {
fadeInView(binding.bottomSheet.ivCafeDetailShrink)
fadeOutView(binding.bottomSheet.ivCafeDetailHandle)
fadeInView(ivCafeDetailShrink)
fadeOutView(ivCafeDetailHandle)
bottomSheet.background =
ContextCompat.getDrawable(requireContext(), us.wedemy.eggeum.android.design.R.drawable.radius_0)
}
}
BottomSheetBehavior.STATE_HIDDEN -> {}
BottomSheetBehavior.STATE_SETTLING -> {}
BottomSheetBehavior.STATE_HALF_EXPANDED -> {
fadeInView(binding.bottomSheet.ivCafeDetailHandle)
fadeOutView(binding.bottomSheet.ivCafeDetailShrink)
binding.bottomSheet.apply {
fadeInView(ivCafeDetailHandle)
fadeOutView(ivCafeDetailShrink)
bottomSheet.background =
ContextCompat.getDrawable(requireContext(), us.wedemy.eggeum.android.design.R.drawable.radius_21)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

package us.wedemy.eggeum.android.main.ui.search

import android.app.Activity
import android.os.Bundle
import android.view.View
import android.view.inputmethod.InputMethodManager
import androidx.fragment.app.activityViewModels
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
Expand All @@ -17,11 +19,11 @@ import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.distinctUntilChangedBy
import kotlinx.coroutines.launch
import us.wedemy.eggeum.android.common.base.BaseFragment
import us.wedemy.eggeum.android.common.extension.addDivider
import us.wedemy.eggeum.android.common.extension.repeatOnStarted
import us.wedemy.eggeum.android.common.extension.safeNavigate
import us.wedemy.eggeum.android.common.extension.textChangesAsFlow
import us.wedemy.eggeum.android.common.base.BaseFragment
import us.wedemy.eggeum.android.design.R
import us.wedemy.eggeum.android.domain.model.place.PlaceEntity
import us.wedemy.eggeum.android.main.databinding.FragmentSearchCafeBinding
Expand Down Expand Up @@ -61,6 +63,7 @@ class SearchCafeFragment : BaseFragment<FragmentSearchCafeBinding>() {
initView()
initListener()
initObserver()
requestSearchFocus()
}

private fun initView() {
Expand Down Expand Up @@ -113,4 +116,14 @@ class SearchCafeFragment : BaseFragment<FragmentSearchCafeBinding>() {
}
}
}

private fun requestSearchFocus() {
binding.tietSearchCafe.requestFocus()
showKeyboard()
}

private fun showKeyboard() {
val imm: InputMethodManager = context?.getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
imm.showSoftInput(binding.tietSearchCafe, 0)
}
}
2 changes: 1 addition & 1 deletion main/src/main/res/layout/bottom_sheet_cafe_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/radius"
android:background="@drawable/radius_21"
app:behavior_draggable="true"
app:behavior_fitToContents="true"
app:behavior_hideable="false"
Expand Down

0 comments on commit b6e2c81

Please sign in to comment.