커뮤니티 전체보기 문자열 리소스화

This commit is contained in:
2025-12-03 20:07:31 +09:00
parent a050a56c19
commit 270d697ce6
5 changed files with 30 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ import android.widget.Toast
import androidx.activity.result.contract.ActivityResultContracts
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.base.BaseActivity
import kr.co.vividnext.sodalive.base.SodaDialog
import kr.co.vividnext.sodalive.common.Constants
@@ -58,7 +59,11 @@ class CreatorCommunityAllActivity : BaseActivity<ActivityCreatorCommunityAllBind
creatorId = intent.getLongExtra(Constants.EXTRA_COMMUNITY_CREATOR_ID, 0)
if (creatorId <= 0) {
Toast.makeText(applicationContext, "잘못된 요청입니다.", Toast.LENGTH_LONG).show()
Toast.makeText(
applicationContext,
getString(R.string.screen_creator_community_all_error_invalid_request),
Toast.LENGTH_LONG
).show()
finish()
}
@@ -81,7 +86,7 @@ class CreatorCommunityAllActivity : BaseActivity<ActivityCreatorCommunityAllBind
loadingDialog = LoadingDialog(this, layoutInflater)
imm = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
binding.toolbar.tvBack.text = "커뮤니티"
binding.toolbar.tvBack.setText(R.string.screen_creator_community_all_title)
binding.toolbar.tvBack.setOnClickListener { finish() }
adapter = CreatorCommunityAllAdapter(
@@ -121,13 +126,13 @@ class CreatorCommunityAllActivity : BaseActivity<ActivityCreatorCommunityAllBind
SodaDialog(
activity = this@CreatorCommunityAllActivity,
layoutInflater = layoutInflater,
title = "게시물 삭제",
desc = "삭제하시겠습니까?",
confirmButtonTitle = "삭제",
title = getString(R.string.screen_creator_community_delete_title),
desc = getString(R.string.screen_creator_community_delete_desc),
confirmButtonTitle = getString(R.string.confirm_delete_title),
confirmButtonClick = {
viewModel.deleteCommunityPostList(postId = postId)
},
cancelButtonTitle = "취소",
cancelButtonTitle = getString(R.string.cancel),
cancelButtonClick = {}
).show(screenWidth)
},

View File

@@ -78,7 +78,10 @@ class CreatorCommunityAllAdapter(
lp.height = lockPostWidth
binding.llLockPost.layoutParams = lp
binding.tvPurchase.text = "${item.price}캔으로 게시글 보기"
binding.tvPurchase.text = context.getString(
R.string.screen_creator_community_purchase_with_can,
item.price
)
binding.tvPurchase.setOnClickListener {
onClickPurchaseContent(item.postId, item.price) { post ->
items[index] = post