Skip to content

Commit

Permalink
Merge pull request #57 from SSU-Plector/refact/ui-refact
Browse files Browse the repository at this point in the history
[Refact/UI refact] 최종 UI 및 디자인 수정
  • Loading branch information
kangyuri1114 authored Aug 12, 2024
2 parents d88666f + a2b125d commit 393f16f
Show file tree
Hide file tree
Showing 32 changed files with 375 additions and 222 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@

<TextView
android:id="@+id/tv_confirm_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="180dp"
android:layout_height="50dp"
android:layout_marginTop="24dp"
android:background="@drawable/button_bright_olive_radius6"
android:background="@drawable/submit_button_background"
android:gravity="center"
android:textAppearance="@font/pretendardblack"
android:textColor="@color/olive_black"
android:textAppearance="@font/pretendardbold"
android:textColor="@color/white"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
2 changes: 2 additions & 0 deletions core/designsystem/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<color name="olive_light_gray">#EDE4E1</color>
<color name="gray1">#C1C1C1</color>
<color name="gray2">#A3A3A3</color>
<color name="gray3">#7E7E7E</color>
<color name="gray4">#5E5E5E</color>

<!-- Other Colors -->
<color name="olive_pink">#FFE5DD</color>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ data class DeveloperMatchingResponse(
val name: String?,
@SerialName("email")
val email: String?,
@SerialName("part1")
val part1: String?,
@SerialName("part2")
val part2: String?,
@SerialName("shortIntro")
val shortIntro: String?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,8 @@ internal fun List<DeveloperMatchingResponse>.toMatchingResult(): List<MatchingRe
id = matchingResult.id ?: -1,
name = matchingResult.name ?: "",
email = matchingResult.email ?: "",
part1 = matchingResult.part1 ?: "",
part2 = matchingResult.part2 ?: "",
description = matchingResult.shortIntro ?: "",
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ data class MatchingResult(
val id: Int,
val name: String,
val email: String,
val part1: String,
val part2: String,
val description: String
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.zucchini.ai_members.designer

import android.util.Log
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.zucchini.domain.repository.AiRepository
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.zucchini.ai_members.designer.branding

import android.os.Bundle
import android.util.Log
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
Expand Down Expand Up @@ -40,10 +41,9 @@ class BrandingFragment : Fragment() {
}

private fun sendProjectBrandingInfoRequest() {
val requestProjectInfo = binding.etBrandingDescription.text.toString()

binding.btnSubmit.setOnClickListener {
hideKeyboard()
val requestProjectInfo = binding.etBrandingDescription.text.toString()
viewModel.getProjectBranding(requestProjectInfo)
}
}
Expand All @@ -55,22 +55,18 @@ class BrandingFragment : Fragment() {
// 초기 화면
binding.aiDesignerBrandingResult.isVisible = false
binding.loadingProgressBar.isVisible = false
binding.tvCopy.isVisible = false
}
is UiState.Loading -> {
binding.tvCopy.isVisible = false
binding.aiDesignerBrandingResult.isVisible = false
binding.loadingProgressBar.isVisible = true
binding.aiDesignerBrandingResult.text = getString(R.string.loading)
}
is UiState.Success -> {
binding.tvCopy.isVisible = true
binding.aiDesignerBrandingResult.isVisible = true
binding.loadingProgressBar.isVisible = false
binding.aiDesignerBrandingResult.text = uiState.data
}
is UiState.Failure -> {
binding.tvCopy.isVisible = false
binding.aiDesignerBrandingResult.isVisible = false
binding.loadingProgressBar.isVisible = false
binding.aiDesignerBrandingResult.text = getString(R.string.fail_to_branding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ class ImageDesignFragment : Fragment() {
}

private fun sendProjectImageRequest() {
val requestProjectInfo = binding.etImageDescription.text.toString()

binding.btnSubmitImage.setOnClickListener {
hideKeyboard()
val requestProjectInfo = binding.etImageDescription.text.toString()
viewModel.getProjectImage(requestProjectInfo)
}
}
Expand All @@ -53,26 +52,22 @@ class ImageDesignFragment : Fragment() {
is UiState.Initial -> {
// 초기 화면
binding.loadingProgressBar.isVisible = false
binding.tvFileDownload.isVisible = false
}

is UiState.Loading -> {
binding.loadingProgressBar.isVisible = true
binding.ivAiDesignerImageResult.isVisible = false
binding.tvFileDownload.isVisible = false
}

is UiState.Success -> {
binding.loadingProgressBar.isVisible = false
binding.ivAiDesignerImageResult.isVisible = true
binding.tvFileDownload.isVisible = true
binding.ivAiDesignerImageResult.load(uiState.data) {
crossfade(true)
}
}

is UiState.Failure -> {
binding.tvFileDownload.isVisible = false
binding.loadingProgressBar.isVisible = false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,21 @@ class MatchingResultFragment : Fragment() {

binding.tvDeveloperName1.text = it.getOrNull(0)?.name
binding.tvDeveloperEmail1.text = it.getOrNull(0)?.email
binding.tvDeveloper1Part1.text = it.getOrNull(0)?.part1
binding.tvDeveloper1Part2.text = it.getOrNull(0)?.part2
binding.tvDeveloperDescription1.text = it.getOrNull(0)?.description

binding.tvDeveloperName2.text = it.getOrNull(1)?.name
binding.tvDeveloperEmail2.text = it.getOrNull(1)?.email
binding.tvDeveloper2Part1.text = it.getOrNull(1)?.part1
binding.tvDeveloper2Part2.text = it.getOrNull(1)?.part2
binding.tvDeveloperDescription2.text = it.getOrNull(1)?.description

binding.tvDeveloperName3.text = it.getOrNull(2)?.name
binding.tvDeveloperEmail3.text = it.getOrNull(2)?.email
binding.tvDeveloper3Part1.text = it.getOrNull(2)?.part1
binding.tvDeveloper3Part2.text = it.getOrNull(2)?.part2
binding.tvDeveloperDescription3.text = it.getOrNull(2)?.description

val devInfo1 = it.getOrNull(0)?.id
val devInfo2 = it.getOrNull(1)?.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.net.Uri
import android.os.Bundle
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import androidx.lifecycle.flowWithLifecycle
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.GridLayoutManager
Expand Down Expand Up @@ -63,6 +64,8 @@ class ProjectDetailActivity : AppCompatActivity() {
.flowWithLifecycle(lifecycle)
.onEach {
adapter.submitList(it)
binding.clIntroduceDev.isVisible = it.isNotEmpty()
binding.tvIntroduceDevTitle.isVisible = it.isNotEmpty()
}.launchIn(lifecycleScope)

viewModel.projectsDetail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.zucchini.submit.project.fragment

import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -80,7 +81,7 @@ class SubmitProjectWithDevFragment : Fragment() {
requireActivity().finish()
}
} else {
showShortToast(getString(R.string.fail_submit_project))
Log.d("SubmitProjectWithDevFragment", "Failed to submit project")
}
}.launchIn(lifecycleScope)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#919191" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="@color/main_olive" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M12,4m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"/>

Expand Down
2 changes: 1 addition & 1 deletion feature/projects/src/main/res/drawable/apply_navi_24.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="#373130"
<vector android:height="24dp" android:tint="@color/main_olive"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M18.41,5.8L17.2,4.59c-0.78,-0.78 -2.05,-0.78 -2.83,0l-2.68,2.68L3,15.96V20h4.04l8.74,-8.74 2.63,-2.63c0.79,-0.78 0.79,-2.05 0,-2.83zM6.21,18H5v-1.21l8.66,-8.66 1.21,1.21L6.21,18zM11,20l4,-4h6v4H11z"/>
Expand Down
2 changes: 1 addition & 1 deletion feature/projects/src/main/res/drawable/devinfo_navi_24.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="#373130"
<vector android:height="24dp" android:tint="@color/main_olive"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M9,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8 0,-0.29 0.02,-0.58 0.05,-0.86 2.36,-1.05 4.23,-2.98 5.21,-5.37C11.07,8.33 14.05,10 17.42,10c0.78,0 1.53,-0.09 2.25,-0.26 0.21,0.71 0.33,1.47 0.33,2.26 0,4.41 -3.59,8 -8,8z"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/olive_black" android:state_checked="true" />
<item android:color="@color/main_olive" android:state_checked="true" />
<item android:color="@color/gray1" android:state_checked="false" />
</selector>
5 changes: 5 additions & 0 deletions feature/projects/src/main/res/drawable/nav_color.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:color="#fff"/>
<item android:state_selected="false" android:color="#B8B8B8"/>
</selector>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#373130" android:viewportHeight="24"
android:tint="@color/main_olive" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M17,10L7,10v2h10v-2zM19,3h-1L18,1h-2v2L8,3L8,1L6,1v2L5,3c-1.11,0 -1.99,0.9 -1.99,2L3,19c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM19,19L5,19L5,8h14v11zM14,14L7,14v2h7v-2z"/>
</vector>
5 changes: 5 additions & 0 deletions feature/projects/src/main/res/drawable/round_bottom_nav.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid
android:color="@color/white"/>
</shape>
12 changes: 6 additions & 6 deletions feature/projects/src/main/res/layout/activity_dev_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:fontFamily="@font/pretendardmedium"
android:fontFamily="@font/pretendardbold"
tools:text="안드로이드 개발자"
android:textColor="@color/olive_black"
android:textSize="10sp"
android:textColor="@color/main_olive"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@id/tv_project_name"
app:layout_constraintTop_toBottomOf="@+id/tv_project_name" />

Expand All @@ -111,10 +111,10 @@
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="5dp"
android:fontFamily="@font/pretendardmedium"
android:fontFamily="@font/pretendardbold"
tools:text="iOS 개발자"
android:textColor="@color/olive_black"
android:textSize="10sp"
android:textColor="@color/main_olive"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/tv_dev_position1"
app:layout_constraintTop_toBottomOf="@+id/tv_project_name" />
Expand Down
13 changes: 8 additions & 5 deletions feature/projects/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bnv_main"
android:layout_width="0dp"
android:layout_height="80dp"
android:background="@color/main_olive"
app:itemActiveIndicatorStyle="@android:color/transparent"
android:layout_height="75dp"
android:background="@drawable/round_bottom_nav"
app:elevation="20dp"
app:layout_constraintVertical_bias=".9"
app:layout_constraintHeight_percent=".1"
app:itemActiveIndicatorStyle="@color/background_olive"
app:itemBackground="@android:color/transparent"
app:itemIconTint="@drawable/menu_selector_color"
app:itemRippleColor="@android:color/transparent"
app:itemRippleColor="@color/background_olive"
app:itemTextColor="@drawable/menu_selector_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/fcv_main"
app:menu="@menu/bottom_navi_menu"
app:itemIconSize="35dp" />
app:itemIconSize="30dp" />

</androidx.constraintlayout.widget.ConstraintLayout>
17 changes: 9 additions & 8 deletions feature/projects/src/main/res/layout/activity_project_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
android:layout_marginEnd="10dp"
android:fontFamily="@font/pretendardbold"
android:textColor="@color/olive_black"
android:textSize="10sp"
android:textSize="13sp"
app:layout_constraintBottom_toTopOf="@+id/cl_project_info"
app:layout_constraintEnd_toEndOf="@id/cl_project_info" />

Expand Down Expand Up @@ -187,7 +187,7 @@
android:background="@drawable/contents_background"
android:fontFamily="@font/pretendardregular"
android:gravity="center"
android:padding="5dp"
android:padding="15dp"
android:paddingHorizontal="2dp"
android:textColor="@color/olive_black"
android:textSize="12sp"
Expand Down Expand Up @@ -433,7 +433,7 @@
android:fontFamily="@font/pretendardbold"
android:text="웹 링크"
android:textColor="@color/olive_black"
android:textSize="10sp"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -443,7 +443,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
android:fontFamily="@font/pretendardregular"
android:textColor="@color/olive_black"
android:textColor="@color/gray3"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -460,7 +460,7 @@
android:fontFamily="@font/pretendardbold"
android:text="앱 다운로드 링크"
android:textColor="@color/olive_black"
android:textSize="10sp"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_web_link" />

Expand All @@ -470,7 +470,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
android:fontFamily="@font/pretendardregular"
android:textColor="@color/olive_black"
android:textColor="@color/gray3"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -486,7 +486,7 @@
android:fontFamily="@font/pretendardbold"
android:text="프로젝트 소개 페이지"
android:textColor="@color/olive_black"
android:textSize="10sp"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_app_link" />

Expand All @@ -496,7 +496,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
android:fontFamily="@font/pretendardregular"
android:textColor="@color/olive_black"
android:textColor="@color/gray3"
android:textSize="10sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -518,6 +518,7 @@
app:layout_constraintTop_toBottomOf="@+id/cl_project_link" />

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_introduce_dev"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
Expand Down
Loading

0 comments on commit 393f16f

Please sign in to comment.