aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-05 23:05:37 -0700
committerAllan Wang <me@allanwang.ca>2017-07-05 23:05:37 -0700
commite3a12337d67802e79c9e7b20d96dff09118b8fc7 (patch)
treec4ab1b7a79bdb548ddda6c74c7fb87c4de8204b7 /core
parent27fcb08588e5691b3dd419bd23603d79f0af484c (diff)
downloadkau-e3a12337d67802e79c9e7b20d96dff09118b8fc7.tar.gz
kau-e3a12337d67802e79c9e7b20d96dff09118b8fc7.tar.bz2
kau-e3a12337d67802e79c9e7b20d96dff09118b8fc7.zip
Avoid theming swipe view
Diffstat (limited to 'core')
-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)