Skip to content

Commit

Permalink
[feature/#92] 프로필 수정 뷰
Browse files Browse the repository at this point in the history
  • Loading branch information
kkk5474096 committed Jan 5, 2023
1 parent 695ab8a commit aa5a06e
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.teamfillin.fillin.databinding.ActivityMyPageBinding
import com.teamfillin.fillin.presentation.dialog.PhotoDialogFragment
import com.teamfillin.fillin.presentation.map.SpaceDecoration
import com.teamfillin.fillin.presentation.my.terms.TermsActivity
import com.teamfillin.fillin.presentation.my.update.ProfileUpdateActivity
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
Expand Down Expand Up @@ -69,6 +70,12 @@ class MyPageActivity : BindingActivity<ActivityMyPageBinding>(R.layout.activity_
finish()
}

binding.ivEdit.setOnSingleClickListener {
Intent(this, ProfileUpdateActivity::class.java).apply {
startActivity(this)
}
}

binding.ivUp.setOnSingleClickListener {
binding.rvMyPage.isVisible = !binding.rvMyPage.isVisible
imageRotation(binding.ivUp, binding.rvMyPage.isVisible)
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/res/drawable/ic_clear.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="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:strokeWidth="1"
android:pathData="M4,2.002L14,12.002"
android:fillColor="#00000000"
android:strokeColor="#FDFAF9"/>
<path
android:strokeWidth="1"
android:pathData="M4,12L14,2"
android:fillColor="#00000000"
android:strokeColor="#FDFAF9"/>
</vector>
163 changes: 163 additions & 0 deletions app/src/main/res/layout/activity_profile_update.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<layout 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">

<data>

<variable
name="viewModel"
type="com.teamfillin.fillin.presentation.my.update.ProfileUpdateViewModel" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/fillin_black">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/fillin_black"
android:paddingVertical="9dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<ImageButton
android:id="@+id/btn_back_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:contentDescription="TODO"
android:src="@drawable/ic_back"
tools:ignore="SpeakableTextPresentCheck"
tools:layout_editor_absoluteY="13dp" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="TODO"
android:src="@drawable/ic_logo" />
</androidx.appcompat.widget.Toolbar>

<ImageView
android:id="@+id/iv_profile"
android:layout_width="55dp"
android:layout_height="55dp"
android:layout_marginTop="40dp"
android:contentDescription="TODO"
android:src="@drawable/ic_basic_profile"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar_title" />

<TextView
android:id="@+id/tv_profile_change"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/profile_image_change"
android:textAppearance="@style/Body1"
android:textColor="@color/grey_3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_profile"
tools:ignore="TextContrastCheck" />

<TextView
android:id="@+id/tv_nickname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/nickname_title"
android:textAppearance="@style/Subhead3"
android:textColor="@color/light_grey_2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_profile_change" />

<EditText
android:id="@+id/et_nickname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="18dp"
android:layout_marginTop="16dp"
android:backgroundTint="@color/grey_4"
android:hint="@string/nickname_hint"
android:inputType="text"
android:maxLength="10"
android:text="@={viewModel.nickname}"
android:textAppearance="@style/Subhead1"
android:textColor="@color/white"
android:textColorHint="@color/grey_4"
app:layout_constraintTop_toBottomOf="@id/tv_nickname"
tools:ignore="TouchTargetSizeCheck,TextContrastCheck"
tools:layout_editor_absoluteX="18dp" />

<ImageView
android:id="@+id/iv_nickname_clear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:src="@drawable/ic_clear"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/et_nickname"
app:layout_constraintEnd_toEndOf="@id/et_nickname"
app:layout_constraintTop_toTopOf="@id/et_nickname" />

<TextView
android:id="@+id/tv_camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:text="@string/camera"
android:textAppearance="@style/Subhead3"
android:textColor="@color/light_grey_2"
app:layout_constraintStart_toStartOf="@id/tv_nickname"
app:layout_constraintTop_toBottomOf="@id/et_nickname" />

<EditText
android:id="@+id/et_camera"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="18dp"
android:layout_marginTop="16dp"
android:backgroundTint="@color/grey_4"
android:hint="@string/camera_hint"
android:inputType="text"
android:text="@={viewModel.cameraName}"
android:textAppearance="@style/EngDisplay1"
android:textColor="@color/white"
android:textColorHint="@color/grey_4"
app:layout_constraintTop_toBottomOf="@id/tv_camera"
tools:ignore="TouchTargetSizeCheck,TextContrastCheck"
tools:layout_editor_absoluteX="18dp" />

<ImageView
android:id="@+id/iv_camera_clear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:src="@drawable/ic_clear"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/et_camera"
app:layout_constraintEnd_toEndOf="@id/et_camera"
app:layout_constraintTop_toTopOf="@id/et_camera" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_add_photo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_btn_fillinred"
android:clickable="false"
android:paddingVertical="20dp"
android:text="@string/profile_change"
android:textAppearance="@style/Headline"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<resources>
<string name="app_name">FILL-IN</string>
<string name="nickname">찰칵찰칵 필린이</string>
<string name="nickname_title">닉네임</string>
<string name="nickname_hint">닉네임을 입력해주세요. (10자 이하)</string>
<string name="profile_image_change">프로필 사진 바꾸기</string>
<string name="profile_change">프로필 변경</string>
<string name="camera_name">Fuji film X 1200</string>
<string name="camera">카메라</string>
<string name="camera_hint">사용중 카메라 이름을 입력해주세요.</string>
<string name="camera_input_text">사용중인 카메라를 입력해주세요.</string>
<string name="like">좋아요</string>
<string name="bookmark">내 현상소</string>
Expand Down

0 comments on commit aa5a06e

Please sign in to comment.