aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt7
1 files changed, 1 insertions, 6 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt
index 22de709..48d7188 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt
@@ -139,7 +139,7 @@ class SwipeBackLayout @JvmOverloads constructor(context: Context, attrs: Attribu
//allow touch from anywhere on the screen
edgeSize = Math.max(resources.displayMetrics.widthPixels, resources.displayMetrics.heightPixels)
minVelocity = minVel
- maxVelocity = 2.5f * minVel
+// maxVelocity = 2.5f * minVel
edgeFlag = edgeFlag
addListener(chromeFadeListener)
}
@@ -249,13 +249,8 @@ class SwipeBackLayout @JvmOverloads constructor(context: Context, attrs: Attribu
fun attachToActivity(activity: Activity) {
if (parent != null) return
this.activity = activity
- val a = activity.theme.obtainStyledAttributes(intArrayOf(android.R.attr.windowBackground))
- val background = a.getResourceId(0, 0)
- a.recycle()
-
val content = activity.window.decorView.findViewById<ViewGroup>(android.R.id.content)
val contentChild = content.getChildAt(0)
- contentChild.setBackgroundResource(background)
content.removeView(contentChild)
addView(contentChild)
setContentView(contentChild)