From e3a12337d67802e79c9e7b20d96dff09118b8fc7 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 5 Jul 2017 23:05:37 -0700 Subject: Avoid theming swipe view --- core/src/main/kotlin/ca/allanwang/kau/swipe/SwipeBackLayout.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'core') 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(android.R.id.content) val contentChild = content.getChildAt(0) - contentChild.setBackgroundResource(background) content.removeView(contentChild) addView(contentChild) setContentView(contentChild) -- cgit v1.2.3