-
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.
- Loading branch information
Showing
5 changed files
with
29 additions
and
17 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package com.hyeeyoung.wishboard.presentation.my.screens | ||
|
||
import android.content.Intent | ||
import android.os.Build | ||
import android.os.Bundle | ||
import android.view.View | ||
import androidx.hilt.navigation.fragment.hiltNavGraphViewModels | ||
|
@@ -23,6 +24,7 @@ import com.hyeeyoung.wishboard.util.UiState | |
import com.hyeeyoung.wishboard.util.extension.collectFlow | ||
import com.hyeeyoung.wishboard.util.extension.navigateSafe | ||
import com.hyeeyoung.wishboard.util.extension.safeValueOf | ||
import com.hyeeyoung.wishboard.util.extension.sendMail | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import kotlinx.coroutines.flow.combine | ||
|
||
|
@@ -54,10 +56,16 @@ class MyFragment : NetworkFragment<FragmentMyBinding>(R.layout.fragment_my) { | |
findNavController().navigateSafe(R.id.action_my_to_password_change) | ||
} | ||
binding.contactUs.setOnClickListener { | ||
val email = Intent(Intent.ACTION_SEND) | ||
email.type = "plain/text" | ||
email.putExtra(Intent.EXTRA_EMAIL, arrayOf("[email protected]")) | ||
startActivity(email) | ||
requireContext().sendMail( | ||
getString(R.string.my_contact_us_email_title), | ||
String.format( | ||
getString(R.string.my_contact_us_email_content), | ||
Build.BRAND, | ||
Build.MODEL, | ||
BuildConfig.VERSION_NAME, | ||
Build.VERSION.SDK_INT, | ||
), | ||
) | ||
} | ||
binding.howToUse.setOnClickListener { | ||
moveWebViewActivity( | ||
|
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/hyeeyoung/wishboard/util/extension/ContextExt.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 |
---|---|---|
@@ -1,9 +1,20 @@ | ||
package com.hyeeyoung.wishboard.util.extension | ||
|
||
import android.content.Context | ||
import android.content.Intent | ||
import android.widget.Toast | ||
import com.hyeeyoung.wishboard.R | ||
|
||
fun Context.showToast(message: String, isShort: Boolean = true) { | ||
val duration = if (isShort) Toast.LENGTH_SHORT else Toast.LENGTH_LONG | ||
Toast.makeText(this, message, duration).show() | ||
} | ||
|
||
fun Context.sendMail(title: String, content: String) { | ||
Intent(Intent.ACTION_SEND).apply { | ||
type = "plain/text" | ||
putExtra(Intent.EXTRA_EMAIL, arrayOf(getString(R.string.wishboard_email))) | ||
putExtra(Intent.EXTRA_SUBJECT, title) | ||
putExtra(Intent.EXTRA_TEXT, content) | ||
}.also { startActivity(it) } | ||
} |
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,6 +1,7 @@ | ||
<resources> | ||
<string name="app_name">WishBoard</string> | ||
<string name="logo_text">Wish Board</string> | ||
<string name="wishboard_email">[email protected]</string> | ||
|
||
<!-- Global --> | ||
<string name="confirm">확인</string> | ||
|
@@ -209,6 +210,8 @@ | |
<string name="my_new_password_re_write">새 비밀번호 재입력</string> | ||
<string name="my_new_password_re_write_hint">새 비밀번호를 다시 입력해 주세요.</string> | ||
<string name="my_password_mismatch_detail">비밀번호가 일치하지 않아요!</string> | ||
<string name="my_contact_us_email_title">위시보드에게 문의하기</string> | ||
<string name="my_contact_us_email_content">안녕하세요. 위시보드 입니다. 🔫\n문의 내용을 하단에 작성해 주세요.\n답변은 전송주신 메일로 회신드리겠습니다. 💌\n감사합니다. 😉\n-------------\n\n\n\n\n\n-------------\nDevice: %s %s\nApp version: %s\nOS Version: %d</string> | ||
|
||
<!-- How To Use --> | ||
<string name="how_to_use_yes_button_text">네! 알겠어요</string> | ||
|