mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-01 06:47:56 +01:00
Formatting
This commit is contained in:
@@ -78,7 +78,7 @@ class ActionModeWithToolbar @JvmOverloads constructor(context: Context, attrs: A
|
||||
callback = null
|
||||
actionMode = null
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
binding.root.startAnimation(bottomAnimation)
|
||||
|
||||
@@ -48,12 +48,12 @@ class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet?
|
||||
val button = MaterialButton(
|
||||
buttonContext,
|
||||
null,
|
||||
R.attr.borderlessButtonStyle
|
||||
R.attr.borderlessButtonStyle,
|
||||
).apply {
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
0,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
1f / actions.size
|
||||
1f / actions.size,
|
||||
)
|
||||
|
||||
setTextColor(buttonColor)
|
||||
@@ -78,7 +78,7 @@ class EmptyView @JvmOverloads constructor(context: Context, attrs: AttributeSet?
|
||||
"ಥ_ಥ",
|
||||
"(˘・_・˘)",
|
||||
"(; ̄Д ̄)",
|
||||
"(・Д・。"
|
||||
"(・Д・。",
|
||||
)
|
||||
|
||||
fun getRandomErrorFace(): String {
|
||||
|
||||
@@ -99,7 +99,7 @@ class HideBottomNavigationOnScrollBehavior @JvmOverloads constructor(
|
||||
}
|
||||
offsetAnimator?.setFloatValues(
|
||||
child.translationY,
|
||||
if (isVisible) 0F else child.height.toFloat()
|
||||
if (isVisible) 0F else child.height.toFloat(),
|
||||
)
|
||||
offsetAnimator?.start()
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class MangaSummaryView @JvmOverloads constructor(
|
||||
|
||||
val toggleDrawable = ContextCompat.getDrawable(
|
||||
context,
|
||||
if (expanded) R.drawable.anim_caret_up else R.drawable.anim_caret_down
|
||||
if (expanded) R.drawable.anim_caret_up else R.drawable.anim_caret_down,
|
||||
)
|
||||
toggleMore.setImageDrawable(toggleDrawable)
|
||||
|
||||
@@ -172,7 +172,7 @@ class MangaSummaryView @JvmOverloads constructor(
|
||||
description?.let {
|
||||
context.copyToClipboard(
|
||||
context.getString(R.string.description),
|
||||
it.toString()
|
||||
it.toString(),
|
||||
)
|
||||
}
|
||||
true
|
||||
@@ -183,7 +183,7 @@ class MangaSummaryView @JvmOverloads constructor(
|
||||
binding.descriptionText,
|
||||
binding.descriptionScrim,
|
||||
binding.toggleMoreScrim,
|
||||
binding.toggleMore
|
||||
binding.toggleMore,
|
||||
).forEach {
|
||||
it.setOnClickListener { expanded = !expanded }
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class MaterialFastScroll @JvmOverloads constructor(context: Context, attrs: Attr
|
||||
setViewsToUse(
|
||||
R.layout.material_fastscroll,
|
||||
R.id.fast_scroller_bubble,
|
||||
R.id.fast_scroller_handle
|
||||
R.id.fast_scroller_handle,
|
||||
)
|
||||
autoHideEnabled = true
|
||||
ignoreTouchesOutsideHandle = true
|
||||
|
||||
@@ -40,7 +40,7 @@ open class SimpleNavigationView @JvmOverloads constructor(
|
||||
attrs,
|
||||
R.styleable.NavigationView,
|
||||
defStyleAttr,
|
||||
R.style.Widget_Design_NavigationView
|
||||
R.style.Widget_Design_NavigationView,
|
||||
)
|
||||
|
||||
a.recycle()
|
||||
|
||||
@@ -90,7 +90,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
||||
animateTranslation(
|
||||
0F,
|
||||
SLIDE_UP_ANIMATION_DURATION,
|
||||
LinearOutSlowInInterpolator()
|
||||
LinearOutSlowInInterpolator(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
||||
animateTranslation(
|
||||
height.toFloat(),
|
||||
SLIDE_DOWN_ANIMATION_DURATION,
|
||||
FastOutLinearInInterpolator()
|
||||
FastOutLinearInInterpolator(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
||||
currentAnimator = null
|
||||
postInvalidate()
|
||||
}
|
||||
})
|
||||
},)
|
||||
}
|
||||
|
||||
internal class SavedState : AbsSavedState {
|
||||
|
||||
@@ -52,7 +52,7 @@ fun MaterialAlertDialogBuilder.setQuadStateMultiChoiceItems(
|
||||
disabledItems = disabledIndices,
|
||||
initialSelected = initialSelected,
|
||||
isActionList = isActionList,
|
||||
listener = selection
|
||||
listener = selection,
|
||||
)
|
||||
val updateScrollIndicators = {
|
||||
binding.scrollIndicatorUp.isVisible = binding.list.canScrollVertically(-1)
|
||||
|
||||
@@ -85,7 +85,7 @@ internal class QuadStateMultiChoiceDialogAdapter(
|
||||
return QuadStateMultiChoiceViewHolder(
|
||||
itemBinding = DialogQuadstatemultichoiceItemBinding
|
||||
.inflate(LayoutInflater.from(parent.context), parent, false),
|
||||
adapter = this
|
||||
adapter = this,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class SwitchPreferenceCategory @JvmOverloads constructor(
|
||||
PreferenceCategory(
|
||||
context,
|
||||
attrs,
|
||||
R.attr.switchPreferenceCompatStyle
|
||||
R.attr.switchPreferenceCompatStyle,
|
||||
),
|
||||
CompoundButton.OnCheckedChangeListener {
|
||||
|
||||
@@ -120,7 +120,7 @@ class SwitchPreferenceCategory @JvmOverloads constructor(
|
||||
getPersistedBoolean(mChecked)
|
||||
} else {
|
||||
defaultValue as Boolean
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
lastScrollPosition = recyclerView.computeHorizontalScrollOffset()
|
||||
}
|
||||
})
|
||||
},)
|
||||
lastScrollPosition?.let { scrollToOffset(it) }
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class ThemesPreference @JvmOverloads constructor(context: Context, attrs: Attrib
|
||||
scrollToPositionWithOffset(
|
||||
// 114dp is the width of the pref_theme_item layout
|
||||
lX / 114.dpToPx,
|
||||
-lX % 114.dpToPx
|
||||
-lX % 114.dpToPx,
|
||||
)
|
||||
}
|
||||
lastScrollPosition = it.computeHorizontalScrollOffset()
|
||||
|
||||
@@ -49,6 +49,6 @@ class BottomSheetViewPager @JvmOverloads constructor(
|
||||
override fun onPageSelected(position: Int) {
|
||||
requestLayout()
|
||||
}
|
||||
})
|
||||
},)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user