Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/#730 오버드로(over draw) 감소 #736

Merged
merged 21 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cc4a954
refactor: 컨퍼런스 화면 Overdraw 최적화
tmdgh1592 Oct 17, 2023
4ac9c54
refactor: 테마의 windowBackground를 white로 변경
tmdgh1592 Oct 17, 2023
574680f
refactor: 테마의 statusBarColor를 투명하게 변경
tmdgh1592 Oct 17, 2023
e4621b4
refactor: 행사 스크랩 화면 Overdraw 최적화
tmdgh1592 Oct 17, 2023
b5b7fcb
refactor: 대회 목록 화면 Overdraw 최적화
tmdgh1592 Oct 17, 2023
cb98b9a
refactor: 프로필 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
970bbcf
refactor: NoContentView OverDraw 최적화
tmdgh1592 Oct 17, 2023
0b485d2
refactor: 행사 검색 화면OverDraw 최적화
tmdgh1592 Oct 17, 2023
83ad2ef
refactor: 알림 보관함 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
0ba13cf
refactor: 행사 상세 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
807f688
refactor: 피드 상세 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
ae8c598
refactor: 같이가요 상세 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
a4d46da
refactor: 설정 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
78dd2c8
refactor: 알림 설정 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
34e0539
refactor: 차단 목록 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
0c50469
refactor: 대댓글 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
b9e5def
refactor: 채팅방 목록 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
100fa13
refactor: 채팅 목록 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
f35b7a4
refactor: 프로필 수정 OverDraw 최적화
tmdgh1592 Oct 17, 2023
cb2d395
refactor: 프로필 조회 화면 OverDraw 최적화
tmdgh1592 Oct 17, 2023
4c2fb9b
refactor: 메인 화면 바텀 네비게이션 배경 투명하게 변경
tmdgh1592 Oct 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class BottomDialogMenuItem(
) : AppCompatTextView(context, attrs, R.style.BottomDialogMenuItemStyle) {

init {
val verticalPadding =
resources.getDimension(R.dimen.padding_bottommenudialog_menu_item_vertical)
.roundToInt()
val verticalPadding = resources
.getDimension(R.dimen.padding_bottommenudialog_menu_item_vertical)
.roundToInt()
setPadding(0, verticalPadding, 0, verticalPadding)
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
package com.emmsale.presentation.common.views.bottomMenuDialog

import android.content.Context
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.view.ViewGroup
import com.emmsale.R
import com.emmsale.databinding.DialogBottomMenuBinding
import com.emmsale.presentation.common.views.VerticalDivider
import com.google.android.material.bottomsheet.BottomSheetDialog

class BottomMenuDialog(context: Context) : BottomSheetDialog(context) {

private val binding: DialogBottomMenuBinding by lazy {
DialogBottomMenuBinding.inflate(layoutInflater)
}
class BottomMenuDialog(
context: Context,
) : BottomSheetDialog(context, R.style.RoundBottomSheetDialogStyle) {
private val binding by lazy { DialogBottomMenuBinding.inflate(layoutInflater) }

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)

initDialogWindow()
}

Expand Down Expand Up @@ -51,7 +48,6 @@ class BottomMenuDialog(context: Context) : BottomSheetDialog(context) {
}

private fun initDialogWindow() {
window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
window?.attributes?.let {
it.width = ViewGroup.LayoutParams.MATCH_PARENT
it.height = ViewGroup.LayoutParams.WRAP_CONTENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.activityViewModels
import com.emmsale.R
import com.emmsale.databinding.FragmentEditmyprofileClubsAddBottomDialogBinding
import com.emmsale.presentation.common.views.ActivityTag
import com.emmsale.presentation.common.views.activityChipOf
Expand Down Expand Up @@ -41,6 +42,8 @@ class ClubsAddBottomDialogFragment : BottomSheetDialogFragment() {
viewModel.fetchAllActivities()
}

override fun getTheme(): Int = R.style.RoundBottomSheetDialogStyle

private fun initDataBinding() {
binding.viewModel = viewModel
binding.addClubs = ::addClubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.activityViewModels
import com.emmsale.R
import com.emmsale.databinding.FragmentEditmyprofileEducationsAddBottomDialogBinding
import com.emmsale.presentation.common.views.ActivityTag
import com.emmsale.presentation.common.views.activityChipOf
Expand Down Expand Up @@ -40,6 +41,8 @@ class EducationsAddBottomDialogFragment : BottomSheetDialogFragment() {
viewModel.fetchAllActivities()
}

override fun getTheme(): Int = R.style.RoundBottomSheetDialogStyle

private fun initDataBinding() {
binding.viewModel = viewModel
binding.addEducations = ::addEducations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.activityViewModels
import com.emmsale.R
import com.emmsale.databinding.FragmentEditmyprofileFieldsAddBottomDialogBinding
import com.emmsale.presentation.common.views.ActivityTag
import com.emmsale.presentation.common.views.activityChipOf
Expand All @@ -28,7 +29,6 @@ class FieldsAddBottomDialogFragment : BottomSheetDialogFragment() {
): View {
_binding = FragmentEditmyprofileFieldsAddBottomDialogBinding
.inflate(layoutInflater, container, false)
binding.lifecycleOwner = viewLifecycleOwner
return binding.root
}

Expand All @@ -40,6 +40,8 @@ class FieldsAddBottomDialogFragment : BottomSheetDialogFragment() {
viewModel.fetchAllActivities()
}

override fun getTheme(): Int = R.style.RoundBottomSheetDialogStyle

private fun initDataBinding() {
binding.viewModel = viewModel
binding.addFields = ::addFields
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.emmsale.presentation.ui.profile

import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.activityViewModels
import com.emmsale.R
import com.emmsale.databinding.DialogSendMessageBinding

class SendMessageDialog : DialogFragment() {
Expand All @@ -24,17 +23,17 @@ class SendMessageDialog : DialogFragment() {
savedInstanceState: Bundle?,
): View {
_binding = DialogSendMessageBinding.inflate(inflater, container, false)
dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
binding.lifecycleOwner = viewLifecycleOwner
return binding.root
}

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

initDataBinding()
}

override fun getTheme(): Int = R.style.RoundBottomSheetDialogStyle

private fun initDataBinding() {
binding.vm = viewModel
binding.onSendButtonClick = ::onSendButtonClick
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false">
<shape android:shape="rectangle">
<solid android:color="@color/white" />
<solid android:color="@android:color/transparent" />
<stroke android:width="1dp" android:color="@color/primary_color" />
<corners android:bottomLeftRadius="30dp" android:bottomRightRadius="20dp" android:topLeftRadius="20dp" android:topRightRadius="30dp" />
<padding android:bottom="9.5dp" android:left="25dp" android:right="25dp" android:top="9.5dp" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/transparent" />
</shape>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
<solid android:color="@android:color/transparent" />
<corners android:radius="40dp" />
<stroke
android:width="1dp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
<solid android:color="@android:color/transparent" />
<corners android:radius="40dp" />
<stroke
android:width="1.5dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
<stroke
android:width="1dp"
android:color="@color/light_gray" />
<solid android:color="@color/white" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/white" />
<solid android:color="@android:color/transparent" />
</shape>
</item>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/primary_color" />
<padding
android:bottom="9dp"
android:left="9dp"
android:right="9dp"
android:top="9dp" />
</shape>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="@color/primary_color" />
<padding
android:bottom="9dp"
android:left="9dp"
android:right="9dp"
android:top="9dp" />
</shape>
</item>
<item android:drawable="@drawable/ic_profile_education" />
</layer-list>
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<!-- Background -->
<item>
<shape>
<solid android:color="@android:color/white" />
<solid android:color="@color/white" />
</shape>
</item>
</layer-list>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item>
<shape android:shape="rectangle">
<solid android:color="@color/white" />
<solid android:color="@android:color/transparent" />
</shape>
</item>

<item android:gravity="bottom">
<shape android:shape="rectangle">
<solid android:color="@color/unselected_tab_indicator_color" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".presentation.ui.childCommentList.ChildCommentActivity">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/tb_childcomments_toolbar"
android:layout_width="0dp"
android:layout_height="?actionBarSize"
android:background="@color/white"
android:keepScreenOn="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down Expand Up @@ -72,7 +70,6 @@
android:id="@+id/layout_childcomments_postchildcomment"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingStart="17dp"
android:paddingTop="8dp"
android:paddingEnd="17dp"
Expand All @@ -97,7 +94,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:background="@android:color/transparent"
android:background="@null"
android:fontFamily="@font/nanum_square_regular"
android:hint="@string/childcomments_edit_child_comment_hint"
android:importantForAutofill="no"
Expand Down Expand Up @@ -134,7 +131,6 @@
android:id="@+id/layout_childcomments_comment_update"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white"
android:clickable="@{layoutChildcommentsCommentUpdate.visibility == View.VISIBLE}"
android:elevation="5dp"
android:paddingTop="8dp"
Expand Down Expand Up @@ -211,7 +207,8 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tb_childcomments_toolbar"
bind:viewModel="@{viewModel}" />
bind:viewModel="@{viewModel}"
tools:visibility="gone" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
android:id="@+id/cl_editmyprofile_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".presentation.ui.editMyProfile.EditMyProfileActivity">

<com.google.android.material.appbar.MaterialToolbar
Expand Down Expand Up @@ -130,7 +129,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginEnd="17dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/editmyprofile_field_add_button"
android:onClick="@{() -> showFieldTags.invoke()}"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -144,9 +143,9 @@
android:layout_marginTop="30dp"
android:layout_marginEnd="17dp"
android:contentDescription="@string/editmyprofile_member_image"
android:onClick="@{()->editProfileImage.invoke()}"
app:imageUrl="@{viewModel.profile.member.profileImageUrl}"
app:isCircle="@{true}"
android:onClick="@{()->editProfileImage.invoke()}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
Expand All @@ -166,11 +165,11 @@
android:id="@+id/rv_editmyprofile_fields"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="17dp"
android:layout_marginTop="23dp"
android:layout_marginEnd="17dp"
android:clipToPadding="false"
android:orientation="horizontal"
android:overScrollMode="never"
android:paddingHorizontal="17dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down Expand Up @@ -239,8 +238,7 @@
android:background="@drawable/bg_profile_activityicon"
android:importantForAccessibility="no"
app:layout_constraintStart_toStartOf="@+id/tv_editmyprofile_activity_label"
app:layout_constraintTop_toBottomOf="@+id/tv_editmyprofile_choose_activity_message"
app:srcCompat="@drawable/ic_profile_education" />
app:layout_constraintTop_toBottomOf="@+id/tv_editmyprofile_choose_activity_message" />

<TextView
android:id="@+id/tv_editmyprofile_educations_label"
Expand Down Expand Up @@ -310,8 +308,7 @@
android:background="@drawable/bg_profile_activityicon"
android:importantForAccessibility="no"
app:layout_constraintStart_toStartOf="@+id/iv_editmyprofile_education_icon"
app:layout_constraintTop_toBottomOf="@+id/tv_editmyprofile_education_add_button"
app:srcCompat="@drawable/ic_profile_education" />
app:layout_constraintTop_toBottomOf="@+id/tv_editmyprofile_education_add_button" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
Loading
Loading