-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat/#14 dev_detail_UI]: 개발자 상세 페이지 ui 구현
- Loading branch information
Showing
30 changed files
with
747 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#373130" | ||
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.77,3.77l-1.77,-1.77l-10,10l10,10l1.77,-1.77l-8.23,-8.23z"/> | ||
</vector> |
11 changes: 11 additions & 0 deletions
11
core/designsystem/src/main/res/drawable/contents_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="340dp" | ||
android:height="56dp" | ||
android:viewportWidth="340" | ||
android:viewportHeight="56"> | ||
<path | ||
android:strokeWidth="1" | ||
android:pathData="M10,0.5L330,0.5A9.5,9.5 0,0 1,339.5 10L339.5,46A9.5,9.5 0,0 1,330 55.5L10,55.5A9.5,9.5 0,0 1,0.5 46L0.5,10A9.5,9.5 0,0 1,10 0.5z" | ||
android:fillColor="#ffffff" | ||
android:strokeColor="#90BD83"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="141dp" | ||
android:height="137dp" | ||
android:viewportWidth="141" | ||
android:viewportHeight="137"> | ||
<path | ||
android:pathData="M10,0L131,0A10,10 0,0 1,141 10L141,127A10,10 0,0 1,131 137L10,137A10,10 0,0 1,0 127L0,10A10,10 0,0 1,10 0z" | ||
android:fillColor="#D9D9D9"/> | ||
</vector> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="84dp" | ||
android:height="33dp" | ||
android:viewportWidth="84" | ||
android:viewportHeight="33"> | ||
<path | ||
android:pathData="M0,10C0,4.477 4.477,0 10,0H73.535C79.057,0 83.535,4.477 83.535,10V23C83.535,28.523 79.057,33 73.535,33H10C4.477,33 0,28.523 0,23V10Z" | ||
android:fillColor="#EDF6EA"/> | ||
</vector> |
8 changes: 8 additions & 0 deletions
8
domain/src/main/java/com/zucchini/domain/model/DevDetailProjectInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.zucchini.domain.model | ||
|
||
data class DevDetailProjectInfo( | ||
val image: Int? = null, | ||
val name: String = "", | ||
val description: String = "", | ||
val sorted: String = "", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application> | ||
<activity | ||
android:name="com.zucchini.projects.DevDetailActivity" | ||
android:exported="false" | ||
android:screenOrientation="portrait" | ||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
<resources> | ||
<string name="top_app_bar_developer">개발자 찾기</string> | ||
<string name="dev_detail_top_bar">개발자 상세 페이지</string> | ||
<string name="github">Github</string> | ||
<string name="kakao_id">카카오톡 아이디</string> | ||
<string name="email">이메일</string> | ||
<string name="tv_navigate_to_project"><u>프로젝트 보러가기↗</u></string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
feature/projects/src/main/java/com/zucchini/projects/DevDetailActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.zucchini.projects | ||
|
||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.recyclerview.widget.LinearLayoutManager | ||
import com.zucchini.feature.projects.databinding.ActivityDevDetailBinding | ||
import com.zucchini.projects.adapter.DevDetailProjectAdapter | ||
|
||
class DevDetailActivity : AppCompatActivity() { | ||
private lateinit var binding: ActivityDevDetailBinding | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
binding = ActivityDevDetailBinding.inflate(layoutInflater) | ||
super.onCreate(savedInstanceState) | ||
setContentView(binding.root) | ||
|
||
initProjectAdapter() | ||
} | ||
|
||
private fun initProjectAdapter() { | ||
val projectAdapter = DevDetailProjectAdapter() | ||
binding.rvDevProject.layoutManager = LinearLayoutManager(this) | ||
binding.rvDevProject.adapter = projectAdapter | ||
projectAdapter.submitList(DevProjectsDummy.devProjectsInfoList) | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...cchini/feature/devInfo/DevInfoFragment.kt → .../com/zucchini/projects/DevInfoFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
feature/projects/src/main/java/com/zucchini/projects/DevProjectsDummy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.zucchini.projects | ||
|
||
import com.zucchini.domain.model.DevDetailProjectInfo | ||
import com.zucchini.feature.projects.R | ||
|
||
object DevProjectsDummy { | ||
val devProjectsInfoList = listOf( | ||
DevDetailProjectInfo( | ||
image = com.zucchini.core.designsystem.R.drawable.project_profile_default, | ||
name = "프로젝트임둥", | ||
description = "가나다아다ㅏ라ㅏ랒아ㅗㅓ 야호", | ||
sorted = "서비스", | ||
), | ||
DevDetailProjectInfo( | ||
image = com.zucchini.core.designsystem.R.drawable.project_profile_default, | ||
name = "프로젝트임둥3333", | ||
description = "가나다아다ㅏ라ㅏ랒아ㅗㅓ 야호", | ||
sorted = "게임", | ||
), | ||
DevDetailProjectInfo( | ||
image = com.zucchini.core.designsystem.R.drawable.project_profile_default, | ||
name = "프로젝트임둥222", | ||
description = "가나다아다ㅏ라ㅏ랒아ㅗㅓ 야호ㅇㅇㅇㅇㅇㅇㅇㅇㅇㅇㅇㅇㅇㅇ", | ||
sorted = "IoT", | ||
), | ||
) | ||
} |
3 changes: 2 additions & 1 deletion
3
...ini/feature/devInfo/DeveloperInfoDummy.kt → ...m/zucchini/projects/DeveloperInfoDummy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
feature/projects/src/main/java/com/zucchini/projects/adapter/DevDetailProjectAdapter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.zucchini.projects.adapter | ||
|
||
import android.content.Intent | ||
import android.view.LayoutInflater | ||
import android.view.ViewGroup | ||
import androidx.core.content.ContextCompat.startActivity | ||
import androidx.recyclerview.widget.ListAdapter | ||
import androidx.recyclerview.widget.RecyclerView | ||
import com.zucchini.domain.model.DevDetailProjectInfo | ||
import com.zucchini.feature.projects.R | ||
import com.zucchini.feature.projects.databinding.ItemDevDetailProjectsBinding | ||
import com.zucchini.projects.DevDetailActivity | ||
import com.zucchini.view.ItemDiffCallback | ||
|
||
class DevDetailProjectAdapter : | ||
ListAdapter<DevDetailProjectInfo, DevDetailProjectAdapter.DevDetailProjectInfoViewHolder>( | ||
ItemDiffCallback<DevDetailProjectInfo>( | ||
onItemsTheSame = { old, new -> old == new }, | ||
onContentsTheSame = { old, new -> old == new }, | ||
), | ||
) { | ||
|
||
override fun onCreateViewHolder( | ||
parent: ViewGroup, | ||
viewType: Int, | ||
): DevDetailProjectInfoViewHolder { | ||
val inflater = LayoutInflater.from(parent.context) | ||
val binding = ItemDevDetailProjectsBinding.inflate(inflater, parent, false) | ||
return DevDetailProjectInfoViewHolder(binding) | ||
} | ||
|
||
override fun onBindViewHolder(holder: DevDetailProjectInfoViewHolder, position: Int) { | ||
holder.bind(getItem(position)) | ||
} | ||
|
||
inner class DevDetailProjectInfoViewHolder(private val binding: ItemDevDetailProjectsBinding) : | ||
RecyclerView.ViewHolder(binding.root) { | ||
fun bind(devDetailProjectInfo: DevDetailProjectInfo) { | ||
binding.run { | ||
ivProjectProfile.setImageResource( | ||
devDetailProjectInfo.image ?: R.drawable.developer_default_image, | ||
) | ||
tvProjectName.text = devDetailProjectInfo.name | ||
tvProjectDescription.text = devDetailProjectInfo.description | ||
tvSortedProject.text = devDetailProjectInfo.sorted | ||
tvNavigateToProject.setOnClickListener { | ||
val intent = Intent(binding.root.context, DevDetailActivity::class.java) | ||
startActivity(binding.root.context, intent, null) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.