Skip to content

Commit

Permalink
Merge branch 'develop' into feat-plan-view
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/src/main/res/values/strings.xml
  • Loading branch information
Dan2dani committed Jan 5, 2024
2 parents 96861da + 7581e12 commit 94aea55
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
android:theme="@style/Theme.Pingle"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".presentation.ui.joingroup.JoinGroupSuccessActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".presentation.ui.onboarding.OnBoardingActivity"
android:exported="false"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package org.sopt.pingle.presentation.ui.joingroup

import android.os.Bundle
import android.text.Spannable
import android.text.SpannableString
import android.text.style.ForegroundColorSpan
import android.text.style.TextAppearanceSpan
import androidx.core.content.ContextCompat
import org.sopt.pingle.R
import org.sopt.pingle.databinding.ActivityJoinGroupSuccessBinding
import org.sopt.pingle.util.base.BindingActivity

class JoinGroupSuccessActivity :
BindingActivity<ActivityJoinGroupSuccessBinding>(R.layout.activity_join_group_success) {
private lateinit var groupName: String
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

initLayout()
}

private fun initLayout() {
// TODO 이전 화면에서 Intent를 통해서 groupName을 가져옴
groupName = "SOPT"

binding.tvJoinGroupSuccessDescriptionGroupName.text = SpannableString(
getString(
R.string.join_group_success_description_group_name,
groupName
)
).apply {
setSpan(
TextAppearanceSpan(
this@JoinGroupSuccessActivity,
R.style.TextAppearance_Pingle_Sub_Semi_16
),
GROUP_NAME_START,
groupName.length,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
setSpan(
ForegroundColorSpan(
ContextCompat.getColor(
this@JoinGroupSuccessActivity,
R.color.g_01
)
),
GROUP_NAME_START,
groupName.length,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
)
}
}

companion object {
const val GROUP_NAME_START = 0
}
}
77 changes: 77 additions & 0 deletions app/src/main/res/layout/activity_join_group_success.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?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">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".presentation.ui.joingroup.JoinGroupSuccessActivity">

<androidx.constraintlayout.widget.Guideline
android:id="@+id/gl_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/spacing24" />

<TextView
android:id="@+id/tv_join_group_success_title"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="108dp"
android:text="@string/join_gorup_success_title"
android:textAppearance="@style/TextAppearance.Pingle.Title.Semi.32"
android:textColor="@color/white"
app:layout_constraintStart_toEndOf="@id/gl_start"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_join_group_success_description_group_name"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="@dimen/spacing16"
android:textAppearance="@style/TextAppearance.Pingle.Body.Med.16"
android:textColor="@color/g_03"
app:layout_constraintStart_toEndOf="@id/gl_start"
app:layout_constraintTop_toBottomOf="@id/tv_join_group_success_title"
tools:text="@string/join_group_success_description_group_name" />


<TextView
android:id="@+id/tv_join_group_success_description"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="@dimen/spacing4"
android:text="@string/join_group_success_description"
android:textAppearance="@style/TextAppearance.Pingle.Body.Med.16"
android:textColor="@color/g_03"
app:layout_constraintStart_toEndOf="@id/gl_start"
app:layout_constraintTop_toBottomOf="@id/tv_join_group_success_description_group_name" />

<ImageView
android:id="@+id/iv_join_group_success"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/spacing26"
android:src="@drawable/ic_launcher_background"
app:layout_constraintBottom_toTopOf="@id/btn_join_group_success"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_join_group_success_description" />

<com.google.android.material.button.MaterialButton
android:id="@+id/btn_join_group_success"
style="@style/Theme.Pingle.Button.L"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/spacing16"
android:layout_marginBottom="@dimen/spacing25"
android:backgroundTint="@color/g_01"
android:text="@string/join_group_success_btn"
android:textColor="@color/black"
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
Expand Up @@ -24,4 +24,10 @@
<string name="plan_close"><u>나가기</u></string>
<string name="plan_next">다음으로</string>
<string name="plan_pingle">핑글 개최하기</string>

<!-- join group success -->
<string name="join_group_success_btn">입장하기</string>
<string name="join_gorup_success_title">단체 입장\n완료!</string>
<string name="join_group_success_description_group_name">%s에서</string>
<string name="join_group_success_description">핑글 여정을 함께해보세요!</string>
</resources>

0 comments on commit 94aea55

Please sign in to comment.