Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #242 from usefulness/renovate/gradle.starter
Browse files Browse the repository at this point in the history
Update gradle.starter to v0.72.0
  • Loading branch information
renovate[bot] authored May 2, 2024
2 parents 29aa7d9 + fd29c1f commit 04ea180
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 15 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
gradle-starter = "0.71.0"
gradle-starter = "0.72.0"
gradle-doctor = "0.9.2"
google-agp = "8.4.0"
google-ksp = "1.9.23-1.0.20"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
11 changes: 7 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ pluginManagement {

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
id "com.gradle.enterprise" version "3.17.2"
id "com.gradle.develocity" version "3.17.2"
}

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"

uploadInBackground = System.getenv("CI") == null
publishing { onlyIf { false } }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ internal class ScrimRenderer(private val rootView: View, private val decorView:
fun getDirtyRect(position: SlidrPosition?): Rect {
when (position) {
SlidrPosition.Left -> dirtyRect[0, 0, decorView.left] = rootView.measuredHeight

SlidrPosition.Right -> dirtyRect[decorView.right, 0, rootView.measuredWidth] =
rootView.measuredHeight

SlidrPosition.Top -> dirtyRect[0, 0, rootView.measuredWidth] = decorView.top

SlidrPosition.Bottom -> dirtyRect[0, decorView.bottom, rootView.measuredWidth] =
rootView.measuredHeight

SlidrPosition.Vertical -> if (decorView.top > 0) {
dirtyRect[0, 0, rootView.measuredWidth] = decorView.top
} else {
dirtyRect[0, decorView.bottom, rootView.measuredWidth] = rootView.measuredHeight
}

SlidrPosition.Horizontal -> if (decorView.left > 0) {
dirtyRect[0, 0, decorView.left] = rootView.measuredHeight
} else {
Expand Down
22 changes: 22 additions & 0 deletions slidr/src/main/kotlin/com/r0adkll/slidr/widget/SliderPanel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
// State Closed
listener?.onClosed()
}

ViewDragHelper.STATE_DRAGGING -> {
}

ViewDragHelper.STATE_SETTLING -> {
}
}
Expand Down Expand Up @@ -147,8 +149,10 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
// State Closed
listener?.onClosed()
}

ViewDragHelper.STATE_DRAGGING -> {
}

ViewDragHelper.STATE_SETTLING -> {
}
}
Expand Down Expand Up @@ -207,8 +211,10 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
// State Closed
listener?.onClosed()
}

ViewDragHelper.STATE_DRAGGING -> {
}

ViewDragHelper.STATE_SETTLING -> {
}
}
Expand Down Expand Up @@ -267,8 +273,10 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
// State Closed
listener?.onClosed()
}

ViewDragHelper.STATE_DRAGGING -> {
}

ViewDragHelper.STATE_SETTLING -> {
}
}
Expand Down Expand Up @@ -337,8 +345,10 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
// State Closed
listener?.onClosed()
}

ViewDragHelper.STATE_DRAGGING -> {
}

ViewDragHelper.STATE_SETTLING -> {
}
}
Expand Down Expand Up @@ -408,8 +418,10 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
// State Closed
listener?.onClosed()
}

ViewDragHelper.STATE_DRAGGING -> {
}

ViewDragHelper.STATE_SETTLING -> {
}
}
Expand All @@ -426,22 +438,27 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
callback = leftCallback
edgePosition = ViewDragHelper.EDGE_LEFT
}

SlidrPosition.Right -> {
callback = rightCallback
edgePosition = ViewDragHelper.EDGE_RIGHT
}

SlidrPosition.Top -> {
callback = topCallback
edgePosition = ViewDragHelper.EDGE_TOP
}

SlidrPosition.Bottom -> {
callback = bottomCallback
edgePosition = ViewDragHelper.EDGE_BOTTOM
}

SlidrPosition.Vertical -> {
callback = verticalCallback
edgePosition = ViewDragHelper.EDGE_TOP or ViewDragHelper.EDGE_BOTTOM
}

SlidrPosition.Horizontal -> {
callback = horizontalCallback
edgePosition = ViewDragHelper.EDGE_LEFT or ViewDragHelper.EDGE_RIGHT
Expand Down Expand Up @@ -541,11 +558,16 @@ internal class SliderPanel(context: Context, private val decorView: View, privat
val yPoint = ev.y
return when (config.position) {
SlidrPosition.Left -> xPoint < config.getEdgeSize(width.toFloat())

SlidrPosition.Right -> xPoint > width - config.getEdgeSize(width.toFloat())

SlidrPosition.Bottom -> yPoint > height - config.getEdgeSize(height.toFloat())

SlidrPosition.Top -> yPoint < config.getEdgeSize(height.toFloat())

SlidrPosition.Horizontal ->
xPoint < config.getEdgeSize(width.toFloat()) || xPoint > width - config.getEdgeSize(width.toFloat())

SlidrPosition.Vertical ->
yPoint < config.getEdgeSize(height.toFloat()) || yPoint > height - config.getEdgeSize(height.toFloat())
}
Expand Down

0 comments on commit 04ea180

Please sign in to comment.