「アプリ設定/挙動/コンテキストメニューの副項目を常に展開する」を追加
This commit is contained in:
parent
8c2b49b406
commit
135bc2d53b
|
@ -220,13 +220,6 @@ internal class DlgContextMenu(
|
||||||
btnBoostedBy,
|
btnBoostedBy,
|
||||||
btnFavouritedBy,
|
btnFavouritedBy,
|
||||||
|
|
||||||
btnCrossAccountActionsForStatus,
|
|
||||||
btnCrossAccountActionsForAccount,
|
|
||||||
btnAroundThisToot,
|
|
||||||
btnYourToot,
|
|
||||||
btnStatusExtraAction,
|
|
||||||
btnAccountExtraAction,
|
|
||||||
|
|
||||||
viewRoot.findViewById<View>(R.id.btnQuoteUrlStatus),
|
viewRoot.findViewById<View>(R.id.btnQuoteUrlStatus),
|
||||||
viewRoot.findViewById<View>(R.id.btnTranslate),
|
viewRoot.findViewById<View>(R.id.btnTranslate),
|
||||||
viewRoot.findViewById<View>(R.id.btnQuoteUrlAccount),
|
viewRoot.findViewById<View>(R.id.btnQuoteUrlAccount),
|
||||||
|
@ -511,6 +504,7 @@ internal class DlgContextMenu(
|
||||||
updateGroup(btnYourToot, llYourToot)
|
updateGroup(btnYourToot, llYourToot)
|
||||||
updateGroup(btnStatusExtraAction, llStatusExtraAction)
|
updateGroup(btnStatusExtraAction, llStatusExtraAction)
|
||||||
updateGroup(btnAccountExtraAction, llAccountExtraAction)
|
updateGroup(btnAccountExtraAction, llAccountExtraAction)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun show() {
|
fun show() {
|
||||||
|
@ -533,12 +527,20 @@ internal class DlgContextMenu(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateGroup(btn : Button, group : View, toggle : Boolean = false) {
|
private fun updateGroup(btn : Button, group : View, toggle : Boolean = false) {
|
||||||
|
|
||||||
if(btn.visibility != View.VISIBLE) {
|
if(btn.visibility != View.VISIBLE) {
|
||||||
vg(group, false)
|
vg(group, false)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(toggle) vg(group, group.visibility != View.VISIBLE)
|
when {
|
||||||
|
Pref.bpAlwaysExpandContextMenuItems(activity.pref) ->{
|
||||||
|
vg(group, true)
|
||||||
|
btn.background = null
|
||||||
|
}
|
||||||
|
toggle -> vg(group, group.visibility != View.VISIBLE)
|
||||||
|
else -> btn.setOnClickListener(this)
|
||||||
|
}
|
||||||
|
|
||||||
val iconId = if(group.visibility == View.VISIBLE) {
|
val iconId = if(group.visibility == View.VISIBLE) {
|
||||||
R.drawable.ic_arrow_drop_up
|
R.drawable.ic_arrow_drop_up
|
||||||
|
|
|
@ -448,6 +448,14 @@ object Pref {
|
||||||
R.id.swSeparateReplyNotificationGroup
|
R.id.swSeparateReplyNotificationGroup
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val bpAlwaysExpandContextMenuItems = BooleanPref(
|
||||||
|
"AlwaysExpandContextMenuItems",
|
||||||
|
false,
|
||||||
|
R.id.swAlwaysExpandContextMenuItems
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// int
|
// int
|
||||||
|
|
||||||
val ipBackButtonAction = IntPref("back_button_action", 0)
|
val ipBackButtonAction = IntPref("back_button_action", 0)
|
||||||
|
@ -550,6 +558,7 @@ object Pref {
|
||||||
val spRoundRatio = StringPref("round_ratio", "33")
|
val spRoundRatio = StringPref("round_ratio", "33")
|
||||||
val spBoostAlpha = StringPref("BoostAlpha", "60")
|
val spBoostAlpha = StringPref("BoostAlpha", "60")
|
||||||
|
|
||||||
|
|
||||||
val spPullNotificationCheckInterval = StringPref("PullNotificationCheckInterval", "15")
|
val spPullNotificationCheckInterval = StringPref("PullNotificationCheckInterval", "15")
|
||||||
val spUserAgent = StringPref("UserAgent", "")
|
val spUserAgent = StringPref("UserAgent", "")
|
||||||
|
|
||||||
|
|
|
@ -448,5 +448,21 @@
|
||||||
|
|
||||||
<View style="@style/setting_divider"/>
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/setting_row_label"
|
||||||
|
android:text="@string/always_expand_context_menu_sub_items"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/setting_row_form">
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/swAlwaysExpandContextMenuItems"
|
||||||
|
style="@style/setting_horizontal_stretch"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View style="@style/setting_divider"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
|
@ -958,5 +958,6 @@
|
||||||
<string name="quick_toot_omit_account_selection">簡易投稿でも可能ならアカウント選択を省略する</string>
|
<string name="quick_toot_omit_account_selection">簡易投稿でも可能ならアカウント選択を省略する</string>
|
||||||
<string name="separate_notification_group_for_reply">返信の通知グループを分ける (Android 8+)</string>
|
<string name="separate_notification_group_for_reply">返信の通知グループを分ける (Android 8+)</string>
|
||||||
<string name="timeline_line_spacing">タイムラインの行間 (数値は文字に対する割合を示します。空欄でデフォルト状態。アプリ再起動が必要)</string>
|
<string name="timeline_line_spacing">タイムラインの行間 (数値は文字に対する割合を示します。空欄でデフォルト状態。アプリ再起動が必要)</string>
|
||||||
|
<string name="always_expand_context_menu_sub_items" >コンテキストメニューの副項目を常に展開する</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -953,4 +953,5 @@
|
||||||
<string name="quick_toot_omit_account_selection">When using quick toot, omit account selection if possible</string>
|
<string name="quick_toot_omit_account_selection">When using quick toot, omit account selection if possible</string>
|
||||||
<string name="separate_notification_group_for_reply">Separate notification groups for reply (Android 8+)</string>
|
<string name="separate_notification_group_for_reply">Separate notification groups for reply (Android 8+)</string>
|
||||||
<string name="timeline_line_spacing">Timeline line spacing (floating number is used as line spacing multiplier. leave empty to default. app restart required)</string>
|
<string name="timeline_line_spacing">Timeline line spacing (floating number is used as line spacing multiplier. leave empty to default. app restart required)</string>
|
||||||
|
<string name="always_expand_context_menu_sub_items" >Always expand sub-items of context menu</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue