Use a getter for iconSize instead of property access
This commit is contained in:
parent
83a35664a4
commit
310f81f850
|
@ -528,7 +528,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
y - iconSize / 2f
|
y - iconSize / 2f
|
||||||
} else {
|
} else {
|
||||||
val clickableRect = home_screen_grid.getClickableRect(gridItem)
|
val clickableRect = home_screen_grid.getClickableRect(gridItem)
|
||||||
clickableRect.top.toFloat() - home_screen_grid.iconSize / 2f
|
clickableRect.top.toFloat() - home_screen_grid.getCurrentIconSize() / 2f
|
||||||
}
|
}
|
||||||
|
|
||||||
home_screen_popup_menu_anchor.x = x
|
home_screen_popup_menu_anchor.x = x
|
||||||
|
|
|
@ -67,8 +67,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||||
private var resizedWidget: HomeScreenGridItem? = null
|
private var resizedWidget: HomeScreenGridItem? = null
|
||||||
private var isFirstDraw = true
|
private var isFirstDraw = true
|
||||||
private var redrawWidgets = false
|
private var redrawWidgets = false
|
||||||
var iconSize = 0
|
private var iconSize = 0
|
||||||
private set
|
|
||||||
|
|
||||||
private var lastPage = 0
|
private var lastPage = 0
|
||||||
private var currentPage = 0
|
private var currentPage = 0
|
||||||
|
@ -1081,6 +1080,8 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getCurrentIconSize(): Int = iconSize
|
||||||
|
|
||||||
private fun handlePageChange(redraw: Boolean = false) {
|
private fun handlePageChange(redraw: Boolean = false) {
|
||||||
pageChangeEnabled = false
|
pageChangeEnabled = false
|
||||||
pageChangeIndicatorsAlpha = 0f
|
pageChangeIndicatorsAlpha = 0f
|
||||||
|
|
Loading…
Reference in New Issue