アプリ設定に「ブーストボタン列の左右の配置」を追加
This commit is contained in:
parent
9d5ec0a2dd
commit
72482a1674
|
@ -77,19 +77,6 @@
|
|||
/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
|
||||
<data
|
||||
android:host="*"
|
||||
android:pathPattern=".*"
|
||||
android:scheme="misskeyclientproto"
|
||||
/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ class ActAppSetting : AppCompatActivity()
|
|||
private lateinit var spDefaultAccount : Spinner
|
||||
private lateinit var spRepliesCount : Spinner
|
||||
private lateinit var spVisibilityStyle : Spinner
|
||||
|
||||
private lateinit var spBoostButtonJustify : Spinner
|
||||
private var footer_button_bg_color : Int = 0
|
||||
private var footer_button_fg_color : Int = 0
|
||||
private var footer_tab_bg_color : Int = 0
|
||||
|
@ -219,7 +219,12 @@ class ActAppSetting : AppCompatActivity()
|
|||
, getString(R.string.mastodon)
|
||||
, getString(R.string.misskey)
|
||||
)
|
||||
|
||||
spBoostButtonJustify= initSpinner(
|
||||
R.id.spBoostButtonJustify
|
||||
, getString(R.string.start)
|
||||
, getString(R.string.center)
|
||||
, getString(R.string.end)
|
||||
)
|
||||
spUITheme = initSpinner(
|
||||
R.id.spUITheme
|
||||
, getString(R.string.theme_light)
|
||||
|
@ -366,6 +371,7 @@ class ActAppSetting : AppCompatActivity()
|
|||
spBackButtonAction.setSelection(Pref.ipBackButtonAction(pref))
|
||||
spRepliesCount.setSelection(Pref.ipRepliesCount(pref))
|
||||
spVisibilityStyle.setSelection(Pref.ipVisibilityStyle(pref))
|
||||
spBoostButtonJustify.setSelection(Pref.ipBoostButtonJustify(pref))
|
||||
spUITheme.setSelection(Pref.ipUiTheme(pref))
|
||||
spResizeImage.setSelection(Pref.ipResizeImage(pref))
|
||||
spRefreshAfterToot.setSelection(Pref.ipRefreshAfterToot(pref))
|
||||
|
@ -482,6 +488,7 @@ class ActAppSetting : AppCompatActivity()
|
|||
.put(Pref.ipBackButtonAction, spBackButtonAction.selectedItemPosition)
|
||||
.put(Pref.ipRepliesCount, spRepliesCount.selectedItemPosition)
|
||||
.put(Pref.ipVisibilityStyle, spVisibilityStyle.selectedItemPosition)
|
||||
.put(Pref.ipBoostButtonJustify, spBoostButtonJustify.selectedItemPosition)
|
||||
.put(Pref.ipUiTheme, spUITheme.selectedItemPosition)
|
||||
.put(Pref.ipResizeImage, spResizeImage.selectedItemPosition)
|
||||
.put(Pref.ipRefreshAfterToot, spRefreshAfterToot.selectedItemPosition)
|
||||
|
|
|
@ -1471,10 +1471,10 @@ internal class ItemViewHolder(
|
|||
val buttonHeight = ActMain.boostButtonSize
|
||||
val marginBetween = (ActMain.boostButtonSize.toFloat() * 0.05f + 0.5f).toInt()
|
||||
|
||||
val paddingH = (buttonHeight.toFloat()/10 +0.5f).toInt()
|
||||
val paddingV = (buttonHeight.toFloat()/10 +0.5f).toInt()
|
||||
val compoundPaddingDp = ActMain.boostButtonSize.toFloat() * 0.00f / activity.resources.displayMetrics.density
|
||||
|
||||
val paddingH = (buttonHeight.toFloat() / 10 + 0.5f).toInt()
|
||||
val paddingV = (buttonHeight.toFloat() / 10 + 0.5f).toInt()
|
||||
val compoundPaddingDp =
|
||||
ActMain.boostButtonSize.toFloat() * 0.00f / activity.resources.displayMetrics.density
|
||||
|
||||
val box = FlexboxLayout(activity)
|
||||
val boxLp = LinearLayout.LayoutParams(
|
||||
|
@ -2149,7 +2149,11 @@ internal class ItemViewHolder(
|
|||
activity
|
||||
, matchParent
|
||||
, 3f
|
||||
, justifyContent = JustifyContent.FLEX_END
|
||||
, justifyContent = when(Pref.ipBoostButtonJustify(App1.pref)) {
|
||||
0 -> JustifyContent.FLEX_START
|
||||
1 -> JustifyContent.CENTER
|
||||
else -> JustifyContent.FLEX_END
|
||||
}
|
||||
)
|
||||
llButtonBar = statusButtonsViewHolder.viewRoot
|
||||
addView(llButtonBar)
|
||||
|
@ -2157,8 +2161,8 @@ internal class ItemViewHolder(
|
|||
tvApplication = textView {
|
||||
gravity = Gravity.END
|
||||
}.lparams(matchParent, wrapContent)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -341,6 +341,7 @@ object Pref {
|
|||
val ipFooterTabIndicatorColor = IntPref("footer_tab_indicator_color", 0)
|
||||
val ipListDividerColor = IntPref("listDividerColor", 0)
|
||||
val ipLastColumnPos = IntPref("last_column_pos", - 1)
|
||||
val ipBoostButtonJustify = IntPref("ipBoostButtonJustify", 2) // 0=左,1=中央,2=右
|
||||
|
||||
// val ipTrendTagCountShowing = IntPref("TrendTagCountShowing", 0)
|
||||
// const val TTCS_WEEKLY = 0
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package jp.juggler.subwaytooter.span
|
||||
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
import android.graphics.Typeface
|
||||
import android.text.TextPaint
|
||||
import android.text.style.MetricAffectingSpan
|
||||
import java.lang.ref.WeakReference
|
||||
import java.util.*
|
||||
|
||||
class MisskeyBigSpan (
|
||||
private val typeface : Typeface
|
||||
|
@ -70,7 +68,7 @@ class MisskeyBigSpan (
|
|||
|
||||
class MisskeyMotionSpan (
|
||||
private val typeface : Typeface
|
||||
): MetricAffectingSpan() ,AnimatableSpan{
|
||||
): MetricAffectingSpan() ,AnimatableSpan {
|
||||
|
||||
private var invalidate_callback : AnimatableSpanInvalidator? = null
|
||||
private var refDrawTarget : WeakReference<Any>? = null
|
||||
|
|
|
@ -1380,6 +1380,21 @@
|
|||
|
||||
<View style="@style/setting_divider"/>
|
||||
|
||||
<TextView
|
||||
style="@style/setting_row_label"
|
||||
android:text="@string/boost_button_alignment"
|
||||
/>
|
||||
|
||||
<LinearLayout style="@style/setting_row_form">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spBoostButtonJustify"
|
||||
style="@style/setting_horizontal_stretch"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<View style="@style/setting_divider"/>
|
||||
|
||||
<TextView
|
||||
style="@style/setting_row_label"
|
||||
android:labelFor="@+id/etAvatarIconSize"
|
||||
|
|
|
@ -760,8 +760,12 @@
|
|||
<string name="dont_show_reaction">Don\'t show reaction</string>
|
||||
<string name="dont_show_vote">Don\'t show vote</string>
|
||||
<string name="boost_button_size">Boost button size( unit:dp, default=40, app restart required)</string>
|
||||
<string name="boost_button_alignment">Boost button alignment (app restart required)</string>
|
||||
<string name="start">Start</string>
|
||||
<string name="center">Center</string>
|
||||
<string name="end">End</string>
|
||||
|
||||
<!--<string name="abc_action_bar_home_description">Revenir à l\'accueil</string>-->
|
||||
<!--<string name="abc_action_bar_home_description">Revenir à l\'accueil</string>-->
|
||||
<!--<string name="abc_action_bar_home_description_format">%1$s, %2$s</string>-->
|
||||
<!--<string name="abc_action_bar_home_subtitle_description_format">%1$s, %2$s, %3$s</string>-->
|
||||
<!--<string name="abc_action_bar_up_description">Revenir en haut de la page</string>-->
|
||||
|
|
|
@ -1038,5 +1038,9 @@
|
|||
<string name="dont_show_reaction">リアクションを表示しない</string>
|
||||
<string name="dont_show_vote">投票を表示しない</string>
|
||||
<string name="boost_button_size">ブーストボタンのサイズ(単位:dp。デフォルト:40。アプリ再起動が必要)</string>
|
||||
<string name="boost_button_alignment">ブーストボタン列の左右の配置 (アプリ再起動が必要)</string>
|
||||
<string name="start">始端</string>
|
||||
<string name="center">中央</string>
|
||||
<string name="end">終端</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -746,4 +746,8 @@
|
|||
<string name="dont_show_reaction">Don\'t show reaction</string>
|
||||
<string name="dont_show_vote">Don\'t show vote</string>
|
||||
<string name="boost_button_size">Boost button size( unit:dp, default=40, app restart required)</string>
|
||||
<string name="boost_button_alignment">Boost button alignment (app restart required)</string>
|
||||
<string name="start">Start</string>
|
||||
<string name="center">Center</string>
|
||||
<string name="end">End</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue