mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-22 10:29:16 +01:00
Increase trigger distance of swipe to refresh
This commit is contained in:
parent
88b05f45d5
commit
61c489dc68
@ -28,6 +28,10 @@ android {
|
||||
sourceCompatibility = javaVersion
|
||||
targetCompatibility = javaVersion
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = javaVersion.toString()
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
debuggable true
|
||||
@ -48,6 +52,10 @@ android {
|
||||
shrinkResources false
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
prefab true
|
||||
viewBinding true
|
||||
}
|
||||
|
||||
/* Linting */
|
||||
lintOptions {
|
||||
@ -56,7 +64,6 @@ android {
|
||||
|
||||
/* NDK */
|
||||
ndkVersion '22.0.7026061'
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version '3.18.1+'
|
||||
@ -67,14 +74,6 @@ android {
|
||||
aaptOptions {
|
||||
ignoreAssetsPattern "*.md"
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = javaVersion.toString()
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
prefab true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -41,6 +41,7 @@ import emu.skyline.loader.RomFormat
|
||||
import emu.skyline.utils.Settings
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@AndroidEntryPoint
|
||||
class MainActivity : AppCompatActivity() {
|
||||
@ -111,7 +112,7 @@ class MainActivity : AppCompatActivity() {
|
||||
binding.swipeRefreshLayout.apply {
|
||||
setProgressBackgroundColorSchemeColor(obtainStyledAttributes(intArrayOf(R.attr.colorPrimary)).use { it.getColor(0, Color.BLACK) })
|
||||
setColorSchemeColors(obtainStyledAttributes(intArrayOf(R.attr.colorAccent)).use { it.getColor(0, Color.BLACK) })
|
||||
post { setDistanceToTriggerSync(binding.swipeRefreshLayout.height / 3) }
|
||||
post { setDistanceToTriggerSync((binding.swipeRefreshLayout.height / 2.5f).roundToInt()) }
|
||||
setOnRefreshListener { loadRoms(false) }
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,8 @@ buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.2'
|
||||
|
Loading…
Reference in New Issue
Block a user