mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-01-30 18:44:52 +01:00
「アプリ設定/挙動/コンテキストメニューの副項目を常に展開する」を追加
This commit is contained in:
parent
8c2b49b406
commit
135bc2d53b
@ -220,13 +220,6 @@ internal class DlgContextMenu(
|
||||
btnBoostedBy,
|
||||
btnFavouritedBy,
|
||||
|
||||
btnCrossAccountActionsForStatus,
|
||||
btnCrossAccountActionsForAccount,
|
||||
btnAroundThisToot,
|
||||
btnYourToot,
|
||||
btnStatusExtraAction,
|
||||
btnAccountExtraAction,
|
||||
|
||||
viewRoot.findViewById<View>(R.id.btnQuoteUrlStatus),
|
||||
viewRoot.findViewById<View>(R.id.btnTranslate),
|
||||
viewRoot.findViewById<View>(R.id.btnQuoteUrlAccount),
|
||||
@ -511,6 +504,7 @@ internal class DlgContextMenu(
|
||||
updateGroup(btnYourToot, llYourToot)
|
||||
updateGroup(btnStatusExtraAction, llStatusExtraAction)
|
||||
updateGroup(btnAccountExtraAction, llAccountExtraAction)
|
||||
|
||||
}
|
||||
|
||||
fun show() {
|
||||
@ -533,12 +527,20 @@ internal class DlgContextMenu(
|
||||
}
|
||||
|
||||
private fun updateGroup(btn : Button, group : View, toggle : Boolean = false) {
|
||||
|
||||
if(btn.visibility != View.VISIBLE) {
|
||||
vg(group, false)
|
||||
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) {
|
||||
R.drawable.ic_arrow_drop_up
|
||||
|
@ -448,6 +448,14 @@ object Pref {
|
||||
R.id.swSeparateReplyNotificationGroup
|
||||
)
|
||||
|
||||
val bpAlwaysExpandContextMenuItems = BooleanPref(
|
||||
"AlwaysExpandContextMenuItems",
|
||||
false,
|
||||
R.id.swAlwaysExpandContextMenuItems
|
||||
)
|
||||
|
||||
|
||||
|
||||
// int
|
||||
|
||||
val ipBackButtonAction = IntPref("back_button_action", 0)
|
||||
@ -550,6 +558,7 @@ object Pref {
|
||||
val spRoundRatio = StringPref("round_ratio", "33")
|
||||
val spBoostAlpha = StringPref("BoostAlpha", "60")
|
||||
|
||||
|
||||
val spPullNotificationCheckInterval = StringPref("PullNotificationCheckInterval", "15")
|
||||
val spUserAgent = StringPref("UserAgent", "")
|
||||
|
||||
|
@ -448,5 +448,21 @@
|
||||
|
||||
<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>
|
||||
</ScrollView>
|
@ -958,5 +958,6 @@
|
||||
<string name="quick_toot_omit_account_selection">簡易投稿でも可能ならアカウント選択を省略する</string>
|
||||
<string name="separate_notification_group_for_reply">返信の通知グループを分ける (Android 8+)</string>
|
||||
<string name="timeline_line_spacing">タイムラインの行間 (数値は文字に対する割合を示します。空欄でデフォルト状態。アプリ再起動が必要)</string>
|
||||
<string name="always_expand_context_menu_sub_items" >コンテキストメニューの副項目を常に展開する</string>
|
||||
|
||||
</resources>
|
||||
|
@ -953,4 +953,5 @@
|
||||
<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="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>
|
Loading…
x
Reference in New Issue
Block a user