Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#47 setUpToolBarのタイトルがハードコーディングされてるのでstringリソース化 #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class BLEActivity : AppCompatActivity(), CoroutineScope {
}

private fun setupViews() {
setUpToolBar(toolBar, "テスト用画面")
setUpToolBar(toolBar, getString(R.string.toolbar_title_ble))

launch (Dispatchers.IO) {
val tempId = tempIdManager.getTempUserId(System.currentTimeMillis())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TestBLEActivity: AppCompatActivity() {
}

private fun setupViews() {
setUpToolBar(toolBar, "BLEテスト")
setUpToolBar(toolBar, getString(R.string.toolbar_title_test_ble))

val clipboardManager = getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager
logText.setOnLongClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class TestContactListActivity: AppCompatActivity(), CoroutineScope {
}

private fun setupViews() {
setUpToolBar(toolBar, "濃厚接触リスト(テスト用)")
setUpToolBar(toolBar, getString(R.string.toolbar_title_test_contact_list))

refreshButton.setOnClickListener {
checkResultText.text = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TestPositiveCheckActivity: AppCompatActivity(), CoroutineScope {
}

private fun setupViews() {
setUpToolBar(toolBar, "陽性者判定(テスト用)")
setUpToolBar(toolBar, getString(R.string.toolbar_title_test_positive_check))
refreshButton.setOnClickListener {
checkResultText.text = ""
check()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AboutActivity: AppCompatActivity() {

private fun setupViews() {
// ツールバー
setUpToolBar(toolBar, "このアプリについて")
setUpToolBar(toolBar, getString(R.string.toolbar_title_about))
versionTextView.text = BuildConfig.VERSION_NAME
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MenuActivity: AppCompatActivity(), MenuNavigator {

private fun setupViews() {
// ツールバー
setUpToolBar(toolBar, "メニュー")
setUpToolBar(toolBar, getString(R.string.toolbar_title_menu))
}

private fun bind() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SettingActivity: AppCompatActivity(), SettingNavigator {

private fun setupViews() {
// ツールバー
setUpToolBar(toolBar, "設定")
setUpToolBar(toolBar, getString(R.string.toolbar_title_setting))

prefectureSelectButton.setOnClickListener {
viewModel.onClickPrefecture()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PermissionSettingActivity: AppCompatActivity() {
}

private fun setupViews() {
setUpToolBar(toolBar, "利用いただくために", "", false)
setUpToolBar(toolBar, getString(R.string.toolbar_title_permission_setting), "", false)
settingButton.setOnClickListener {
if (enableBluetooth()) {
setupPermissionsAndSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class InputPrefectureActivity: AppCompatActivity(),

private fun setupViews() {
// ツールバー
setUpToolBar(toolBar, "都道府県選択")
setUpToolBar(toolBar, getString(R.string.toolbar_title_input_prefecture))

executeButton.setOnClickListener {
val input = prefecturesSelectText.selectItem() as PrefectureType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AgreementActivity: AppCompatActivity(), AgreementNavigator {
}

private fun setupViews() {
setUpToolBar(toolBar, "利用規約への同意")
setUpToolBar(toolBar, getString(R.string.toolbar_title_agreement))

agreeButton.setOnClickListener {
viewModel.onClickAgree()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TraceDataUploadActivity: AppCompatActivity(), TraceDataUploadNavigator {

private fun setupViews() {
// ツールバー
setUpToolBar(toolBar, "陽性報告")
setUpToolBar(toolBar, getString(R.string.toolbar_title_trace_data_upload))

codeInputText.requestFocus()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TraceHistoryActivity: AppCompatActivity() {

private fun setupViews() {
// ツールバー
setUpToolBar(toolBar, "接触履歴")
setUpToolBar(toolBar, getString(R.string.toolbar_title_trace_history))
// リスト
recyclerView.apply {
layoutManager = LinearLayoutManager(this@TraceHistoryActivity)
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
<!-- FetchErrorView -->
<string name="fetch_error_view_reload_button">再読み込み</string>

<!-- Toolbar Title -->
<string name="toolbar_title_about">このアプリについて</string>
<string name="toolbar_title_test_contact_list">濃厚接触リスト(テスト用)</string>
<string name="toolbar_title_agreement">利用規約への同意</string>
<string name="toolbar_title_test_positive_check">陽性者判定(テスト用)</string>
<string name="toolbar_title_test_ble">BLEテスト</string>
<string name="toolbar_title_ble">テスト用画面</string>
<string name="toolbar_title_menu">メニュー</string>
<string name="toolbar_title_setting">設定</string>
<string name="toolbar_title_permission_setting">利用いただくために</string>
<string name="toolbar_title_input_prefecture">都道府県選択</string>
<string name="toolbar_title_trace_data_upload">陽性報告</string>
<string name="toolbar_title_trace_history">接触履歴</string>

<!-- 持ち込みなので、後で削除するかも -->
<string name="service_ok_title">まもりあいJAPANのスキャン中</string>
Expand Down