Skip to content

Commit

Permalink
[UI]:vector 위까지 #12
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunjium committed Nov 21, 2023
1 parent 6116ece commit 3bf3eaa
Show file tree
Hide file tree
Showing 10 changed files with 297 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import org.sopt.carrot.data.datasource.TestDataSource
import org.sopt.carrot.data.repo.TestRepoImpl
import org.sopt.carrot.presentation.test.TestViewModel
//import org.sopt.carrot.presentation.test.TestViewModel

class ViewModelFactory : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
if (modelClass.isAssignableFrom(TestViewModel::class.java)) {
return TestViewModel(TestRepoImpl(TestDataSource())) as T
}
throw IllegalArgumentException("Unknown ViewModel Class")
}
// override fun <T : ViewModel> create(modelClass: Class<T>): T {
// if (modelClass.isAssignableFrom(TestViewModel::class.java)) {
// return TestViewModel(TestRepoImpl(TestDataSource())) as T
// }
// throw IllegalArgumentException("Unknown ViewModel Class")
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@ package org.sopt.carrot.presentation.joinmeeting

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import coil.load
import coil.transform.RoundedCornersTransformation
import org.sopt.carrot.R
import org.sopt.carrot.databinding.ActivityJoinMeetingBinding

class JoinMeetingActivity : AppCompatActivity() {
private lateinit var binding: ActivityJoinMeetingBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_join_meeting)
binding = ActivityJoinMeetingBinding.inflate(layoutInflater)
setContentView(binding.root)


binding.ivJoinMeetingProfile.load("https://github-production-user-asset-6210df.s3.amazonaws.com/98076050/275424965-975a57c1-1581-4283-9613-5486b67986de.jpeg") {
crossfade(true) //fade in 애니메이션
error(R.drawable.ic_launcher_foreground) //Load Error 시 보여줄 이미지
transformations(RoundedCornersTransformation(42F)) // 이미지를 원형으로 자르는 편집 기능 사용
}
}
}
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/baseline_remove_black.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#505156"
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="M19,13H5v-2h14v2z"/>
</vector>
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/chevron_down_orange.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="17dp"
android:height="16dp"
android:viewportWidth="17"
android:viewportHeight="16">
<path
android:pathData="M6.029,2.862C5.768,3.122 5.768,3.544 6.029,3.805L10.224,8L6.029,12.195C5.768,12.455 5.768,12.878 6.029,13.138C6.289,13.398 6.711,13.398 6.972,13.138L11.638,8.471C11.899,8.211 11.899,7.789 11.638,7.528L6.972,2.862C6.711,2.601 6.289,2.601 6.029,2.862Z"
android:fillColor="#FF6F0F"
android:fillType="evenOdd"/>
</vector>
39 changes: 39 additions & 0 deletions app/src/main/res/drawable/ic_meatball_circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="40dp"
android:height="40dp"
android:viewportWidth="40"
android:viewportHeight="40">
<path
android:pathData="M20,0L20,0A20,20 0,0 1,40 20L40,20A20,20 0,0 1,20 40L20,40A20,20 0,0 1,0 20L0,20A20,20 0,0 1,20 0z"
android:fillColor="#F2F3F7"/>
<path
android:pathData="M20,20.667C20.368,20.667 20.667,20.368 20.667,20C20.667,19.632 20.368,19.333 20,19.333C19.632,19.333 19.333,19.632 19.333,20C19.333,20.368 19.632,20.667 20,20.667Z"
android:fillColor="#212529"/>
<path
android:pathData="M20,16C20.368,16 20.667,15.701 20.667,15.333C20.667,14.965 20.368,14.667 20,14.667C19.632,14.667 19.333,14.965 19.333,15.333C19.333,15.701 19.632,16 20,16Z"
android:fillColor="#212529"/>
<path
android:pathData="M20,25.333C20.368,25.333 20.667,25.035 20.667,24.667C20.667,24.298 20.368,24 20,24C19.632,24 19.333,24.298 19.333,24.667C19.333,25.035 19.632,25.333 20,25.333Z"
android:fillColor="#212529"/>
<path
android:pathData="M20,20.667C20.368,20.667 20.667,20.368 20.667,20C20.667,19.632 20.368,19.333 20,19.333C19.632,19.333 19.333,19.632 19.333,20C19.333,20.368 19.632,20.667 20,20.667Z"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#212529"
android:strokeLineCap="round"/>
<path
android:pathData="M20,16C20.368,16 20.667,15.701 20.667,15.333C20.667,14.965 20.368,14.667 20,14.667C19.632,14.667 19.333,14.965 19.333,15.333C19.333,15.701 19.632,16 20,16Z"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#212529"
android:strokeLineCap="round"/>
<path
android:pathData="M20,25.333C20.368,25.333 20.667,25.035 20.667,24.667C20.667,24.298 20.368,24 20,24C19.632,24 19.333,24.298 19.333,24.667C19.333,25.035 19.632,25.333 20,25.333Z"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#212529"
android:strokeLineCap="round"/>
</vector>
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/ic_share_circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="40dp"
android:height="40dp"
android:viewportWidth="40"
android:viewportHeight="40">
<path
android:pathData="M20,0L20,0A20,20 0,0 1,40 20L40,20A20,20 0,0 1,20 40L20,40A20,20 0,0 1,0 20L0,20A20,20 0,0 1,20 0z"
android:fillColor="#F2F3F7"/>
<path
android:pathData="M15.625,19.125C14.811,19.125 14.404,19.125 14.071,19.214C13.165,19.457 12.457,20.165 12.214,21.071C12.125,21.404 12.125,21.811 12.125,22.625V23.675C12.125,25.145 12.125,25.88 12.411,26.442C12.663,26.936 13.064,27.337 13.558,27.589C14.12,27.875 14.855,27.875 16.325,27.875H23.675C25.145,27.875 25.88,27.875 26.442,27.589C26.936,27.337 27.337,26.936 27.589,26.442C27.875,25.88 27.875,25.145 27.875,23.675V22.625C27.875,21.811 27.875,21.404 27.786,21.071C27.543,20.165 26.835,19.457 25.929,19.214C25.596,19.125 25.189,19.125 24.375,19.125M23.5,15.625L20,12.125M20,12.125L16.5,15.625M20,12.125V22.625"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
android:strokeColor="#212529"
android:strokeLineCap="round"/>
</vector>
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/join_meeting_grey_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/carrot_grey100" />
<corners android:radius="4dp" />
</shape>
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/join_meeting_look_member.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/carrot_primary_background" />
<corners android:radius="6dp" />
</shape>
196 changes: 187 additions & 9 deletions app/src/main/res/layout/activity_join_meeting.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<layout>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"

<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".presentation.joinmeeting.JoinMeetingActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="모임 가입하기(현지 페이지)"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/iv_join_meeting_background"
android:layout_width="0dp"
android:layout_height="164dp"
android:src="@drawable/ic_launcher_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/iv_join_meeting_profile"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginStart="15dp"
android:layout_marginTop="144dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/iv_join_meeting_meatball_circle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@drawable/ic_meatball_circle"
app:layout_constraintBottom_toBottomOf="@id/iv_join_meeting_profile"
app:layout_constraintEnd_toEndOf="parent" />

<ImageView
android:id="@+id/iv_join_meeting_share_circle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="9dp"
android:src="@drawable/ic_share_circle"
app:layout_constraintBottom_toBottomOf="@id/iv_join_meeting_meatball_circle"
app:layout_constraintEnd_toStartOf="@id/iv_join_meeting_meatball_circle" />

<TextView
android:id="@+id/tv_join_meeting_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:fontFamily="@font/apple_sd_gothic_neo_eb"
android:paddingStart="1dp"
android:text="@string/join_meeting_title"
android:textColor="@color/carrot_black"
android:textSize="19sp"
app:layout_constraintEnd_toEndOf="@id/iv_join_meeting_meatball_circle"
app:layout_constraintStart_toStartOf="@id/iv_join_meeting_profile"
app:layout_constraintTop_toBottomOf="@id/iv_join_meeting_profile" />

<ImageView
android:id="@+id/iv_join_meeting_look_member"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginTop="12dp"
android:src="@drawable/join_meeting_look_member"
app:layout_constraintEnd_toEndOf="@id/iv_join_meeting_meatball_circle"
app:layout_constraintStart_toStartOf="@id/iv_join_meeting_profile"
app:layout_constraintTop_toBottomOf="@id/tv_join_meeting_title" />

<TextView
android:id="@+id/tv_join_meeting_look_member"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="3dp"
android:fontFamily="@font/apple_sd_gothic_neo_b"
android:text="@string/join_meeting_look_member"
android:textColor="@color/carrot_primary_button"
android:textSize="13dp"
app:layout_constraintBottom_toBottomOf="@id/iv_join_meeting_look_member"
app:layout_constraintEnd_toEndOf="@id/iv_join_meeting_look_member"
app:layout_constraintStart_toStartOf="@id/iv_join_meeting_look_member"
app:layout_constraintTop_toTopOf="@id/iv_join_meeting_look_member" />

<ImageView
android:id="@+id/iv_join_meeting_look_member_chevron_down"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="3dp"
android:src="@drawable/chevron_down_orange"
app:layout_constraintBottom_toBottomOf="@id/tv_join_meeting_look_member"
app:layout_constraintStart_toEndOf="@id/tv_join_meeting_look_member"
app:layout_constraintTop_toTopOf="@id/tv_join_meeting_look_member" />

<TextView
android:id="@+id/tv_join_meeting_excercise"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/join_meeting_grey_background"
android:fontFamily="@font/apple_sd_gothic_neo_m"
android:paddingHorizontal="8dp"
android:paddingVertical="4dp"
android:text="@string/excercise"
android:textColor="@color/carrot_grey500"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@id/iv_join_meeting_look_member"
app:layout_constraintTop_toBottomOf="@id/iv_join_meeting_look_member" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:layout_marginTop="20dp"
android:background="@drawable/join_meeting_grey_background"
android:fontFamily="@font/apple_sd_gothic_neo_m"
android:paddingHorizontal="8dp"
android:paddingVertical="4dp"
android:text="@string/join_meeting_age"
android:textColor="@color/carrot_grey500"
android:textSize="12sp"
app:layout_constraintStart_toEndOf="@id/tv_join_meeting_excercise"
app:layout_constraintTop_toBottomOf="@id/iv_join_meeting_look_member" />

<TextView
android:id="@+id/tv_join_meeting_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginTop="10dp"
android:fontFamily="@font/apple_sd_gothic_neo_m"
android:text="hello"
android:textColor="@color/carrot_black"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_join_meeting_excercise" />

<TextView
android:id="@+id/tv_join_meeting_eveything"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="19dp"
android:fontFamily="@font/apple_sd_gothic_neo_b"
android:paddingVertical="10dp"
android:text="@string/join_meeting_everything"
android:textColor="@color/carrot_black"
android:textSize="13sp"
app:layout_constraintEnd_toStartOf="@id/tv_join_meeting_album"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_join_meeting_content" />

<TextView
android:id="@+id/tv_join_meeting_album"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/apple_sd_gothic_neo_b"
android:paddingVertical="10dp"
android:text="@string/join_meeting_album"
android:textColor="@color/carrot_grey400"
android:textSize="13sp"
app:layout_constraintEnd_toStartOf="@id/tv_join_meeting_schedule"
app:layout_constraintStart_toEndOf="@id/tv_join_meeting_eveything"
app:layout_constraintTop_toTopOf="@id/tv_join_meeting_eveything" />

<TextView
android:id="@+id/tv_join_meeting_schedule"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/apple_sd_gothic_neo_b"
android:paddingVertical="10dp"
android:text="@string/join_meeting_schedule"
android:textColor="@color/carrot_grey400"
android:textSize="13sp"
app:layout_constraintEnd_toStartOf="@id/tv_join_meeting_notice"
app:layout_constraintStart_toEndOf="@id/tv_join_meeting_album"
app:layout_constraintTop_toTopOf="@id/tv_join_meeting_eveything" />

</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_join_meeting_notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/apple_sd_gothic_neo_b"
android:paddingVertical="10dp"
android:text="@string/join_meeting_notice"
android:textColor="@color/carrot_grey400"
android:textSize="13sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_join_meeting_schedule"
app:layout_constraintTop_toTopOf="@id/tv_join_meeting_eveything" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</layout>
8 changes: 8 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@
<string name="nearby">내 근처</string>
<string name="chatting">채팅</string>
<string name="my_carrot">나의 당근</string>
<string name="join_meeting_title">[수지] 테니스 치실 동네분들 모십니다 ^^</string>
<string name="join_meeting_look_member">40명의 멤버 보기</string>
<string name="excercise">운동</string>
<string name="join_meeting_age">23~53세</string>
<string name="join_meeting_everything">전체</string>
<string name="join_meeting_album">앨범</string>
<string name="join_meeting_schedule">일정</string>
<string name="join_meeting_notice">게시판</string>
</resources>

0 comments on commit 3bf3eaa

Please sign in to comment.