From cef7d228faaf59ee11546bce36fc1185a0732904 Mon Sep 17 00:00:00 2001 From: Siubeng Fung Date: Wed, 26 Feb 2020 15:51:51 +0800 Subject: [PATCH] Main: Add initial message & allow select text to copy in context menu dialog Signed-off-by: Siubeng Fung --- app/src/main/java/moe/feng/danmaqua/ui/MainActivity.kt | 2 ++ .../layout/main_danmaku_context_menu_dialog_layout.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 8 ++++++++ app/src/main/res/values-zh-rTW/strings.xml | 8 ++++++++ app/src/main/res/values/strings.xml | 10 ++++++++++ 5 files changed, 29 insertions(+) diff --git a/app/src/main/java/moe/feng/danmaqua/ui/MainActivity.kt b/app/src/main/java/moe/feng/danmaqua/ui/MainActivity.kt index 964b9f1..df62f94 100644 --- a/app/src/main/java/moe/feng/danmaqua/ui/MainActivity.kt +++ b/app/src/main/java/moe/feng/danmaqua/ui/MainActivity.kt @@ -169,6 +169,8 @@ class MainActivity : BaseActivity(), supportFragmentManager.commit { replace(R.id.drawerView, DrawerViewFragment()) } + messageAdapter.addSystemMessage(getString(R.string.main_welcome_message)) + messageAdapter.addSystemMessage(getString(R.string.main_thanks_message)) } else { online = savedInstanceState.getInt(STATE_ONLINE) savedInstanceState.getParcelableArrayList(STATE_LIST_DATA)?.let { diff --git a/app/src/main/res/layout/main_danmaku_context_menu_dialog_layout.xml b/app/src/main/res/layout/main_danmaku_context_menu_dialog_layout.xml index 35c32d0..e43ecc1 100644 --- a/app/src/main/res/layout/main_danmaku_context_menu_dialog_layout.xml +++ b/app/src/main/res/layout/main_danmaku_context_menu_dialog_layout.xml @@ -32,6 +32,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2dp" + android:textIsSelectable="true" android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" tools:text="Test danmaku. Bala Bala Bala"/> diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 084a0e9..2e5322c 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -360,4 +360,12 @@ 你已经成功地将 %s 导出到 %s。 导出失败 + + + \ No newline at end of file diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 190f5fd..5f2effb 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -360,4 +360,12 @@ 你已經成功地將 %s 匯出到 %s。 匯出失敗 + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1fcd75d..8d53bbb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -380,4 +380,14 @@ You have exported %s to %s successfully. Failed to export + + + \ No newline at end of file