Formatting

This commit is contained in:
arkon
2022-04-08 16:44:23 -04:00
parent 2dfafa387b
commit 5afff31f72
197 changed files with 481 additions and 483 deletions

View File

@@ -78,7 +78,7 @@ class ActionModeWithToolbar @JvmOverloads constructor(context: Context, attrs: A
callback = null
actionMode = null
}
}
},
)
}
binding.root.startAnimation(bottomAnimation)

View File

@@ -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 {

View File

@@ -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()
}

View File

@@ -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 }
}

View File

@@ -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

View File

@@ -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()

View File

@@ -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 {

View File

@@ -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)

View File

@@ -85,7 +85,7 @@ internal class QuadStateMultiChoiceDialogAdapter(
return QuadStateMultiChoiceViewHolder(
itemBinding = DialogQuadstatemultichoiceItemBinding
.inflate(LayoutInflater.from(parent.context), parent, false),
adapter = this
adapter = this,
)
}

View File

@@ -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
}
},
)
}
}

View File

@@ -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()

View File

@@ -49,6 +49,6 @@ class BottomSheetViewPager @JvmOverloads constructor(
override fun onPageSelected(position: Int) {
requestLayout()
}
})
},)
}
}