Remove landscape row and column counts
This commit is contained in:
parent
1cbc887c3c
commit
3ed5119129
|
@ -152,8 +152,8 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (checkedYCell in 0 until getHomeColumnCount()) {
|
for (checkedYCell in 0 until config.homeColumnCount) {
|
||||||
for (checkedXCell in 0 until getHomeRowCount() - 1) {
|
for (checkedXCell in 0 until config.homeRowCount - 1) {
|
||||||
val wantedCell = Pair(checkedXCell, checkedYCell)
|
val wantedCell = Pair(checkedXCell, checkedYCell)
|
||||||
if (!occupiedCells.contains(wantedCell)) {
|
if (!occupiedCells.contains(wantedCell)) {
|
||||||
return Rect(wantedCell.first, wantedCell.second, wantedCell.first, wantedCell.second)
|
return Rect(wantedCell.first, wantedCell.second, wantedCell.first, wantedCell.second)
|
||||||
|
@ -210,8 +210,8 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
home_screen_grid?.resizeGrid(
|
home_screen_grid?.resizeGrid(
|
||||||
newRowCount = getHomeRowCount(),
|
newRowCount = config.homeRowCount,
|
||||||
newColumnCount = getHomeColumnCount()
|
newColumnCount = config.homeColumnCount
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
mLongPressedIcon = gridItem
|
mLongPressedIcon = gridItem
|
||||||
val anchorY = if (isOnAllAppsFragment || gridItem.type == ITEM_TYPE_WIDGET) {
|
val anchorY = if (isOnAllAppsFragment || gridItem.type == ITEM_TYPE_WIDGET) {
|
||||||
y
|
y
|
||||||
} else if (gridItem.top == getHomeRowCount() - 1) {
|
} else if (gridItem.top == config.homeRowCount - 1) {
|
||||||
home_screen_grid.sideMargins.top + (gridItem.top * home_screen_grid.cellHeight.toFloat())
|
home_screen_grid.sideMargins.top + (gridItem.top * home_screen_grid.cellHeight.toFloat())
|
||||||
} else {
|
} else {
|
||||||
(gridItem.top * home_screen_grid.cellHeight.toFloat())
|
(gridItem.top * home_screen_grid.cellHeight.toFloat())
|
||||||
|
@ -704,7 +704,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
val defaultDialerPackage = (getSystemService(Context.TELECOM_SERVICE) as TelecomManager).defaultDialerPackage
|
val defaultDialerPackage = (getSystemService(Context.TELECOM_SERVICE) as TelecomManager).defaultDialerPackage
|
||||||
appLaunchers.firstOrNull { it.packageName == defaultDialerPackage }?.apply {
|
appLaunchers.firstOrNull { it.packageName == defaultDialerPackage }?.apply {
|
||||||
val dialerIcon =
|
val dialerIcon =
|
||||||
HomeScreenGridItem(null, 0, getHomeRowCount() - 1, 0, getHomeRowCount() - 1, defaultDialerPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
HomeScreenGridItem(null, 0, config.homeRowCount - 1, 0, config.homeRowCount - 1, defaultDialerPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
||||||
homeScreenGridItems.add(dialerIcon)
|
homeScreenGridItems.add(dialerIcon)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -714,7 +714,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
val defaultSMSMessengerPackage = Telephony.Sms.getDefaultSmsPackage(this)
|
val defaultSMSMessengerPackage = Telephony.Sms.getDefaultSmsPackage(this)
|
||||||
appLaunchers.firstOrNull { it.packageName == defaultSMSMessengerPackage }?.apply {
|
appLaunchers.firstOrNull { it.packageName == defaultSMSMessengerPackage }?.apply {
|
||||||
val SMSMessengerIcon =
|
val SMSMessengerIcon =
|
||||||
HomeScreenGridItem(null, 1, getHomeRowCount() - 1, 1, getHomeRowCount() - 1, defaultSMSMessengerPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
HomeScreenGridItem(null, 1, config.homeRowCount - 1, 1, config.homeRowCount - 1, defaultSMSMessengerPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
||||||
homeScreenGridItems.add(SMSMessengerIcon)
|
homeScreenGridItems.add(SMSMessengerIcon)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -726,7 +726,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
val defaultBrowserPackage = resolveInfo!!.activityInfo.packageName
|
val defaultBrowserPackage = resolveInfo!!.activityInfo.packageName
|
||||||
appLaunchers.firstOrNull { it.packageName == defaultBrowserPackage }?.apply {
|
appLaunchers.firstOrNull { it.packageName == defaultBrowserPackage }?.apply {
|
||||||
val browserIcon =
|
val browserIcon =
|
||||||
HomeScreenGridItem(null, 2, getHomeRowCount() - 1, 2, getHomeRowCount() - 1, defaultBrowserPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
HomeScreenGridItem(null, 2, config.homeRowCount - 1, 2, config.homeRowCount - 1, defaultBrowserPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
||||||
homeScreenGridItems.add(browserIcon)
|
homeScreenGridItems.add(browserIcon)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -737,7 +737,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
val storePackage = potentialStores.firstOrNull { isPackageInstalled(it) && appLaunchers.map { it.packageName }.contains(it) }
|
val storePackage = potentialStores.firstOrNull { isPackageInstalled(it) && appLaunchers.map { it.packageName }.contains(it) }
|
||||||
if (storePackage != null) {
|
if (storePackage != null) {
|
||||||
appLaunchers.firstOrNull { it.packageName == storePackage }?.apply {
|
appLaunchers.firstOrNull { it.packageName == storePackage }?.apply {
|
||||||
val storeIcon = HomeScreenGridItem(null, 3, getHomeRowCount() - 1, 3, getHomeRowCount() - 1, storePackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
val storeIcon = HomeScreenGridItem(null, 3, config.homeRowCount - 1, 3, config.homeRowCount - 1, storePackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
||||||
homeScreenGridItems.add(storeIcon)
|
homeScreenGridItems.add(storeIcon)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -750,7 +750,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||||
val defaultCameraPackage = resolveInfo!!.activityInfo.packageName
|
val defaultCameraPackage = resolveInfo!!.activityInfo.packageName
|
||||||
appLaunchers.firstOrNull { it.packageName == defaultCameraPackage }?.apply {
|
appLaunchers.firstOrNull { it.packageName == defaultCameraPackage }?.apply {
|
||||||
val cameraIcon =
|
val cameraIcon =
|
||||||
HomeScreenGridItem(null, 4, getHomeRowCount() - 1, 4, getHomeRowCount() - 1, defaultCameraPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
HomeScreenGridItem(null, 4, config.homeRowCount - 1, 4, config.homeRowCount - 1, defaultCameraPackage, "", title, ITEM_TYPE_ICON, "", -1, "", "", null)
|
||||||
homeScreenGridItems.add(cameraIcon)
|
homeScreenGridItems.add(cameraIcon)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
|
@ -11,8 +11,6 @@ import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.launcher.BuildConfig
|
import com.simplemobiletools.launcher.BuildConfig
|
||||||
import com.simplemobiletools.launcher.R
|
import com.simplemobiletools.launcher.R
|
||||||
import com.simplemobiletools.launcher.extensions.config
|
import com.simplemobiletools.launcher.extensions.config
|
||||||
import com.simplemobiletools.launcher.extensions.getHomeColumnCount
|
|
||||||
import com.simplemobiletools.launcher.extensions.getHomeRowCount
|
|
||||||
import com.simplemobiletools.launcher.helpers.MAX_COLUMN_COUNT
|
import com.simplemobiletools.launcher.helpers.MAX_COLUMN_COUNT
|
||||||
import com.simplemobiletools.launcher.helpers.MAX_ROW_COUNT
|
import com.simplemobiletools.launcher.helpers.MAX_ROW_COUNT
|
||||||
import com.simplemobiletools.launcher.helpers.MIN_COLUMN_COUNT
|
import com.simplemobiletools.launcher.helpers.MIN_COLUMN_COUNT
|
||||||
|
@ -93,7 +91,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupHomeRowCount() {
|
private fun setupHomeRowCount() {
|
||||||
val currentRowCount = getHomeRowCount()
|
val currentRowCount = config.homeRowCount
|
||||||
settings_home_screen_row_count.text = currentRowCount.toString()
|
settings_home_screen_row_count.text = currentRowCount.toString()
|
||||||
settings_home_screen_row_count_holder.setOnClickListener {
|
settings_home_screen_row_count_holder.setOnClickListener {
|
||||||
val items = ArrayList<RadioItem>()
|
val items = ArrayList<RadioItem>()
|
||||||
|
@ -104,11 +102,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
RadioGroupDialog(this, items, currentRowCount) {
|
RadioGroupDialog(this, items, currentRowCount) {
|
||||||
val newRowCount = it as Int
|
val newRowCount = it as Int
|
||||||
if (currentRowCount != newRowCount) {
|
if (currentRowCount != newRowCount) {
|
||||||
if (portrait) {
|
config.homeRowCount = newRowCount
|
||||||
config.portraitHomeRowCount = newRowCount
|
|
||||||
} else {
|
|
||||||
config.landscapeHomeRowCount = newRowCount
|
|
||||||
}
|
|
||||||
setupHomeRowCount()
|
setupHomeRowCount()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +110,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupHomeColumnCount() {
|
private fun setupHomeColumnCount() {
|
||||||
val currentColumnCount = getHomeColumnCount()
|
val currentColumnCount = config.homeColumnCount
|
||||||
settings_home_screen_column_count.text = currentColumnCount.toString()
|
settings_home_screen_column_count.text = currentColumnCount.toString()
|
||||||
settings_home_screen_column_count_holder.setOnClickListener {
|
settings_home_screen_column_count_holder.setOnClickListener {
|
||||||
val items = ArrayList<RadioItem>()
|
val items = ArrayList<RadioItem>()
|
||||||
|
@ -127,11 +121,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
RadioGroupDialog(this, items, currentColumnCount) {
|
RadioGroupDialog(this, items, currentColumnCount) {
|
||||||
val newColumnCount = it as Int
|
val newColumnCount = it as Int
|
||||||
if (currentColumnCount != newColumnCount) {
|
if (currentColumnCount != newColumnCount) {
|
||||||
if (portrait) {
|
config.homeColumnCount = newColumnCount
|
||||||
config.portraitHomeColumnCount = newColumnCount
|
|
||||||
} else {
|
|
||||||
config.landscapeHomeColumnCount = newColumnCount
|
|
||||||
}
|
|
||||||
setupHomeColumnCount()
|
setupHomeColumnCount()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,22 +31,6 @@ fun Context.getColumnCount(): Int {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.getHomeRowCount(): Int {
|
|
||||||
return if (portrait) {
|
|
||||||
config.portraitHomeRowCount
|
|
||||||
} else {
|
|
||||||
config.landscapeHomeRowCount
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Context.getHomeColumnCount(): Int {
|
|
||||||
return if (portrait) {
|
|
||||||
config.portraitHomeColumnCount
|
|
||||||
} else {
|
|
||||||
config.landscapeHomeColumnCount
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Context.getDrawableForPackageName(packageName: String): Drawable? {
|
fun Context.getDrawableForPackageName(packageName: String): Drawable? {
|
||||||
var drawable: Drawable? = null
|
var drawable: Drawable? = null
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -12,19 +12,11 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
get() = prefs.getBoolean(WAS_HOME_SCREEN_INIT, false)
|
get() = prefs.getBoolean(WAS_HOME_SCREEN_INIT, false)
|
||||||
set(wasHomeScreenInit) = prefs.edit().putBoolean(WAS_HOME_SCREEN_INIT, wasHomeScreenInit).apply()
|
set(wasHomeScreenInit) = prefs.edit().putBoolean(WAS_HOME_SCREEN_INIT, wasHomeScreenInit).apply()
|
||||||
|
|
||||||
var portraitHomeColumnCount: Int
|
var homeColumnCount: Int
|
||||||
get() = prefs.getInt(PORTRAIT_HOME_COLUMN_COUNT, COLUMN_COUNT)
|
get() = prefs.getInt(HOME_COLUMN_COUNT, COLUMN_COUNT)
|
||||||
set(portraitHomeColumnCount) = prefs.edit().putInt(PORTRAIT_HOME_COLUMN_COUNT, portraitHomeColumnCount).apply()
|
set(homeColumnCount) = prefs.edit().putInt(HOME_COLUMN_COUNT, homeColumnCount).apply()
|
||||||
|
|
||||||
var landscapeHomeColumnCount: Int
|
var homeRowCount: Int
|
||||||
get() = prefs.getInt(LANDSCAPE_HOME_COLUMN_COUNT, COLUMN_COUNT)
|
get() = prefs.getInt(HOME_ROW_COUNT, ROW_COUNT)
|
||||||
set(landscapeHomeColumnCount) = prefs.edit().putInt(LANDSCAPE_HOME_COLUMN_COUNT, landscapeHomeColumnCount).apply()
|
set(homeRowCount) = prefs.edit().putInt(HOME_ROW_COUNT, homeRowCount).apply()
|
||||||
|
|
||||||
var portraitHomeRowCount: Int
|
|
||||||
get() = prefs.getInt(PORTRAIT_HOME_ROW_COUNT, ROW_COUNT)
|
|
||||||
set(portraitHomeRowCount) = prefs.edit().putInt(PORTRAIT_HOME_ROW_COUNT, portraitHomeRowCount).apply()
|
|
||||||
|
|
||||||
var landscapeHomeRowCount: Int
|
|
||||||
get() = prefs.getInt(LANDSCAPE_HOME_ROW_COUNT, ROW_COUNT)
|
|
||||||
set(landscapeHomeRowCount) = prefs.edit().putInt(LANDSCAPE_HOME_ROW_COUNT, landscapeHomeRowCount).apply()
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,8 @@ const val WIDGET_LIST_ITEMS_HOLDER = 1
|
||||||
|
|
||||||
// shared prefs
|
// shared prefs
|
||||||
const val WAS_HOME_SCREEN_INIT = "was_home_screen_init"
|
const val WAS_HOME_SCREEN_INIT = "was_home_screen_init"
|
||||||
const val PORTRAIT_HOME_ROW_COUNT = "portrait_home_row_count"
|
const val HOME_ROW_COUNT = "home_row_count"
|
||||||
const val LANDSCAPE_HOME_ROW_COUNT = "landscape_home_row_count"
|
const val HOME_COLUMN_COUNT = "home_column_count"
|
||||||
const val PORTRAIT_HOME_COLUMN_COUNT = "portrait_home_column_count"
|
|
||||||
const val LANDSCAPE_HOME_COLUMN_COUNT = "landscape_home_column_count"
|
|
||||||
|
|
||||||
// default home screen grid size
|
// default home screen grid size
|
||||||
const val ROW_COUNT = 6
|
const val ROW_COUNT = 6
|
||||||
|
|
|
@ -22,9 +22,8 @@ import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.commons.helpers.isSPlus
|
import com.simplemobiletools.commons.helpers.isSPlus
|
||||||
import com.simplemobiletools.launcher.R
|
import com.simplemobiletools.launcher.R
|
||||||
import com.simplemobiletools.launcher.activities.MainActivity
|
import com.simplemobiletools.launcher.activities.MainActivity
|
||||||
|
import com.simplemobiletools.launcher.extensions.config
|
||||||
import com.simplemobiletools.launcher.extensions.getDrawableForPackageName
|
import com.simplemobiletools.launcher.extensions.getDrawableForPackageName
|
||||||
import com.simplemobiletools.launcher.extensions.getHomeColumnCount
|
|
||||||
import com.simplemobiletools.launcher.extensions.getHomeRowCount
|
|
||||||
import com.simplemobiletools.launcher.extensions.homeScreenGridItemsDB
|
import com.simplemobiletools.launcher.extensions.homeScreenGridItemsDB
|
||||||
import com.simplemobiletools.launcher.helpers.*
|
import com.simplemobiletools.launcher.helpers.*
|
||||||
import com.simplemobiletools.launcher.models.HomeScreenGridItem
|
import com.simplemobiletools.launcher.models.HomeScreenGridItem
|
||||||
|
@ -46,8 +45,8 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||||
private var redrawWidgets = false
|
private var redrawWidgets = false
|
||||||
private var iconSize = 0
|
private var iconSize = 0
|
||||||
|
|
||||||
private var columnCount = context.getHomeColumnCount()
|
private var columnCount = context.config.homeColumnCount
|
||||||
private var rowCount = context.getHomeRowCount()
|
private var rowCount = context.config.homeRowCount
|
||||||
private var cellXCoords = ArrayList<Int>(columnCount)
|
private var cellXCoords = ArrayList<Int>(columnCount)
|
||||||
private var cellYCoords = ArrayList<Int>(rowCount)
|
private var cellYCoords = ArrayList<Int>(rowCount)
|
||||||
var cellWidth = 0
|
var cellWidth = 0
|
||||||
|
@ -642,14 +641,14 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fillCellSizes() {
|
private fun fillCellSizes() {
|
||||||
cellWidth = getFakeWidth() / context.getHomeColumnCount()
|
cellWidth = getFakeWidth() / context.config.homeColumnCount
|
||||||
cellHeight = getFakeHeight() / context.getHomeRowCount()
|
cellHeight = getFakeHeight() / context.config.homeRowCount
|
||||||
iconSize = min(cellWidth, cellHeight) - 2 * iconMargin
|
iconSize = min(cellWidth, cellHeight) - 2 * iconMargin
|
||||||
for (i in 0 until context.getHomeColumnCount()) {
|
for (i in 0 until context.config.homeColumnCount) {
|
||||||
cellXCoords.add(i, i * cellWidth)
|
cellXCoords.add(i, i * cellWidth)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i in 0 until context.getHomeRowCount()) {
|
for (i in 0 until context.config.homeRowCount) {
|
||||||
cellYCoords.add(i, i * cellHeight)
|
cellYCoords.add(i, i * cellHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,15 +689,15 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||||
if (rect.left < 0) {
|
if (rect.left < 0) {
|
||||||
rect.right -= rect.left
|
rect.right -= rect.left
|
||||||
rect.left = 0
|
rect.left = 0
|
||||||
} else if (rect.right > context.getHomeColumnCount() - 1) {
|
} else if (rect.right > context.config.homeColumnCount - 1) {
|
||||||
val diff = rect.right - context.getHomeColumnCount() + 1
|
val diff = rect.right - context.config.homeColumnCount + 1
|
||||||
rect.right -= diff
|
rect.right -= diff
|
||||||
rect.left -= diff
|
rect.left -= diff
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not allow placing widgets at the bottom row, that is for pinned default apps
|
// do not allow placing widgets at the bottom row, that is for pinned default apps
|
||||||
if (rect.bottom >= context.getHomeRowCount() - 1) {
|
if (rect.bottom >= context.config.homeRowCount - 1) {
|
||||||
val diff = rect.bottom - context.getHomeRowCount() + 2
|
val diff = rect.bottom - context.config.homeRowCount + 2
|
||||||
rect.bottom -= diff
|
rect.bottom -= diff
|
||||||
rect.top -= diff
|
rect.top -= diff
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,8 @@ import android.util.AttributeSet
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import com.simplemobiletools.launcher.R
|
import com.simplemobiletools.launcher.R
|
||||||
|
import com.simplemobiletools.launcher.extensions.config
|
||||||
import com.simplemobiletools.launcher.extensions.getCellCount
|
import com.simplemobiletools.launcher.extensions.getCellCount
|
||||||
import com.simplemobiletools.launcher.extensions.getHomeColumnCount
|
|
||||||
import com.simplemobiletools.launcher.extensions.getHomeRowCount
|
|
||||||
import com.simplemobiletools.launcher.helpers.MAX_CLICK_DURATION
|
import com.simplemobiletools.launcher.helpers.MAX_CLICK_DURATION
|
||||||
import com.simplemobiletools.launcher.models.HomeScreenGridItem
|
import com.simplemobiletools.launcher.models.HomeScreenGridItem
|
||||||
|
|
||||||
|
@ -76,8 +75,8 @@ class MyAppWidgetResizeFrame(context: Context, attrs: AttributeSet, defStyle: In
|
||||||
it.provider.className == gridItem.className
|
it.provider.className == gridItem.className
|
||||||
} ?: return
|
} ?: return
|
||||||
|
|
||||||
minResizeWidthCells = Math.min(context.getHomeColumnCount(), context.getCellCount(providerInfo.minResizeWidth))
|
minResizeWidthCells = Math.min(context.config.homeColumnCount, context.getCellCount(providerInfo.minResizeWidth))
|
||||||
minResizeHeightCells = Math.min(context.getHomeRowCount(), context.getCellCount(providerInfo.minResizeHeight))
|
minResizeHeightCells = Math.min(context.config.homeRowCount, context.getCellCount(providerInfo.minResizeHeight))
|
||||||
redrawFrame()
|
redrawFrame()
|
||||||
|
|
||||||
occupiedCells.clear()
|
occupiedCells.clear()
|
||||||
|
@ -224,7 +223,7 @@ class MyAppWidgetResizeFrame(context: Context, attrs: AttributeSet, defStyle: In
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wantedBottomCellY == context.getHomeRowCount() - 1) {
|
if (wantedBottomCellY == context.config.homeRowCount - 1) {
|
||||||
areAllCellsFree = false
|
areAllCellsFree = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +321,7 @@ class MyAppWidgetResizeFrame(context: Context, attrs: AttributeSet, defStyle: In
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wantedBottomCellY == context.getHomeRowCount() - 1) {
|
if (wantedBottomCellY == context.config.homeRowCount - 1) {
|
||||||
areAllCellsFree = false
|
areAllCellsFree = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue