Skip to content

Commit

Permalink
Revert "[FEAT] 홈 디테일 뷰 구현"
Browse files Browse the repository at this point in the history
  • Loading branch information
amourxyoung authored Jul 15, 2023
1 parent 43a7cee commit 541086d
Show file tree
Hide file tree
Showing 42 changed files with 123 additions and 1,346 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {

defaultConfig {
applicationId "com.puzzling.puzzlingaos"
minSdk 26
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -48,7 +48,7 @@ dependencies {
// app compat
implementation 'androidx.appcompat:appcompat:1.6.1'
// material
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.7.0'
// constraint layout
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// test
Expand Down
21 changes: 6 additions & 15 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,11 @@
android:supportsRtl="true"
android:theme="@style/Theme.PuzzlingAOS"
tools:targetApi="31">
<activity
android:name=".presentation.home.team.TeamPuzzleBoardActivity"
android:exported="false" />
<activity
android:name=".presentation.home.personal.MyPuzzleBoardActivity"
android:exported="false" />

<activity
android:name=".presentation.writeRetrospective.WriteRetrospectiveActivity"
android:exported="true"
android:windowSoftInputMode="adjustPan" />
android:windowSoftInputMode="adjustPan"/>
<activity
android:name=".presentation.main.MainActivity"
android:exported="true"
Expand All @@ -36,18 +31,14 @@
<activity android:name=".presentation.invitationCode.InvitationCodeActivity"
android:windowSoftInputMode="adjustPan"
android:exported="true"/>
<activity
android:name=".presentation.invitationCode.InvitationCodeActivity"
android:exported="true"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".presentation.register.RegisterActivity"
android:exported="true"
android:windowSoftInputMode="adjustPan" />
android:windowSoftInputMode="adjustPan"
android:exported="true" />
<activity
android:name=".presentation.team.currentSituation.TeamCurrentSituationFragment"
android:exported="true"
android:windowSoftInputMode="adjustPan" />
android:windowSoftInputMode="adjustPan"
android:exported="true" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
package com.puzzling.puzzlingaos.base

import android.graphics.Color
import android.widget.ImageView
import android.widget.TextView
import androidx.databinding.BindingAdapter
import coil.load

@BindingAdapter("image")
fun ImageView.setImage(imageUrl: String) {
this.load(imageUrl)
}

@BindingAdapter("spanTextColor")
fun setTextColor(view: TextView, inputText: String?) {
val isConditionMet = inputText == "Your Condition"
view.setTextColor(if (isConditionMet) Color.BLUE else Color.BLACK)
}
// TODO span color 이용해서 텍스트 컬러 처리
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ data class ActionPlan(
@SerialName("actionPlanContent")
val actionPlanContent: String,
@SerialName("actionPlanDate")
val actionPlanDate: String?,
val actionPlanDate: String,
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
package com.puzzling.puzzlingaos.presentation.home

import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.fragment.app.commit
import com.google.android.material.tabs.TabLayout
import com.puzzling.puzzlingaos.R
import com.puzzling.puzzlingaos.base.BaseFragment
import com.puzzling.puzzlingaos.databinding.FragmentHomeBinding
import com.puzzling.puzzlingaos.presentation.home.personal.PersonalDashboardFragment
import com.puzzling.puzzlingaos.presentation.home.team.TeamDashboardFragment
import com.puzzling.puzzlingaos.presentation.main.HomeChooseProjectFragment

class HomeFragment :
BaseFragment<FragmentHomeBinding>(R.layout.fragment_home) {
private val viewModel by activityViewModels<HomeViewModel>()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.vm = viewModel
initTabItem()
showProjectBottomSheet()
clickTabItem()
showPopupMessage()
handleSelectedProject()
}

private fun initTabItem() {
Expand Down Expand Up @@ -56,29 +47,4 @@ class HomeFragment :
}
})
}

private fun showProjectBottomSheet() {
binding.clHomeProjectMain.setOnClickListener {
val chooseProjectFragment = HomeChooseProjectFragment()
chooseProjectFragment.show(parentFragmentManager, "show")
}
}

private fun showPopupMessage() {
binding.btnHomeNotification.setOnClickListener {
val isCardVisible = binding.cvHomePopup.isVisible
binding.cvHomePopup.isVisible = !isCardVisible
}
}

private fun handleSelectedProject() {
viewModel.isProjectNameSelected.observe(viewLifecycleOwner) {
Log.d("home", "isProjectSelected: ${viewModel.isProjectNameSelected.value}")
if (viewModel.isProjectNameSelected.value == true) {
val projectName = viewModel.selectedProjectName.value
binding.tvHomeProjectName.text = projectName.toString()
Log.d("home", "tvHomeProjectName: ${binding.tvHomeProjectName.text}")
}
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class PersonalDashboardFragment :
super.onViewCreated(view, savedInstanceState)
setActionPlanAdapter()
clickBottomBtn()
clickMyPuzzleBoardBtn()
clickPuzzlePiece()
}

private fun setActionPlanAdapter() {
Expand All @@ -41,21 +39,4 @@ class PersonalDashboardFragment :
}
}
}

private fun clickMyPuzzleBoardBtn() {
binding.clPersonalTopBackground.setOnClickListener {
activity?.let {
val intent = Intent(context, MyPuzzleBoardActivity::class.java)
startActivity(intent)
}
}
}

private fun clickPuzzlePiece() {
with(binding) {
// TODO 각 퍼즐 조각 클릭 -> 각 날짜의 회고 상세조회로 넘어가는 로직 추가
clPersonalMain1.setOnClickListener {
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.puzzling.puzzlingaos.presentation.home.personal

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.puzzling.puzzlingaos.domain.entity.ActionPlan

Expand All @@ -13,8 +12,4 @@ class PersonalDashboardViewModel : ViewModel() {
ActionPlan("여기에는 글이 계속 작성되다가 작성되다가 작성되다가 작성되다가 이쯤 되면 끊기게 돼...", "7월 6일"),
ActionPlan("여기에는 글이 계속 작성되다가 작성되다가 작성되다가 작성되다가 이쯤 되면 끊기게 돼...", "7월 7일"),
)

val _bottomButtonText = MutableLiveData<String>()
val bottomButtonText: String
get() = _bottomButtonText.value ?: "회고 작성일이 아니에요"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.puzzling.puzzlingaos.presentation.home.team

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.fragment.app.viewModels
Expand All @@ -14,15 +13,5 @@ class TeamDashboardFragment :

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
clickTeamPuzzleBoardBtn()
}

private fun clickTeamPuzzleBoardBtn() {
binding.clTeamTopBackground.setOnClickListener {
activity?.let {
val intent = Intent(context, TeamPuzzleBoardActivity::class.java)
startActivity(intent)
}
}
}
}

This file was deleted.

Loading

0 comments on commit 541086d

Please sign in to comment.