ui: fix edit layout crashes
Fix crashes that prevented android studio from showing layout previews of certain views.
This commit is contained in:
@@ -59,7 +59,9 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||||||
|
|
||||||
override fun onAttachedToWindow() {
|
override fun onAttachedToWindow() {
|
||||||
super.onAttachedToWindow()
|
super.onAttachedToWindow()
|
||||||
(layoutParams as CoordinatorLayout.LayoutParams).behavior = Behavior(context)
|
if (!isInEditMode) {
|
||||||
|
(layoutParams as CoordinatorLayout.LayoutParams).behavior = Behavior(context)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun findTitleView(): TextView {
|
private fun findTitleView(): TextView {
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getCornerRadiusRes() =
|
private fun getCornerRadiusRes() =
|
||||||
if (uiSettings.roundMode) {
|
if (!isInEditMode && uiSettings.roundMode) {
|
||||||
SIZING_CORNER_RADII[sizing]
|
SIZING_CORNER_RADII[sizing]
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package org.oxycblt.auxio.ui
|
||||||
|
|
||||||
|
class IconToolbar {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user