Skip to content

Commit 4d7298a

Browse files
committed
Open things up
1 parent d313aa4 commit 4d7298a

File tree

4 files changed

+26
-27
lines changed

4 files changed

+26
-27
lines changed

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
apply plugin: 'com.android.application'
2-
apply plugin: 'kotlin-android-extensions'
3-
apply plugin: 'kotlin-android'
1+
apply plugin: "com.android.application"
2+
apply plugin: "kotlin-android-extensions"
3+
apply plugin: "kotlin-android"
44

55
android {
66
compileSdkVersion 29
@@ -15,7 +15,7 @@ android {
1515
buildTypes {
1616
release {
1717
minifyEnabled false
18-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
1919
}
2020
}
2121
lintOptions {
@@ -24,7 +24,7 @@ android {
2424
}
2525

2626
dependencies {
27-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
28-
implementation 'androidx.appcompat:appcompat:1.1.0'
29-
implementation project(':translationviewdraghelper')
27+
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version")
28+
implementation("androidx.appcompat:appcompat:1.1.0")
29+
implementation(project(":translationviewdraghelper"))
3030
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.50'
2+
ext.kotlin_version = '1.3.61'
33
repositories {
44
google()
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.5.1'
8+
classpath 'com.android.tools.build:gradle:3.5.3'
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1111
}
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'kotlin-android-extensions'
3-
apply plugin: 'kotlin-android'
1+
apply plugin: "com.android.library"
2+
apply plugin: "kotlin-android"
43

54
android {
65
compileSdkVersion 29
@@ -14,7 +13,7 @@ android {
1413
buildTypes {
1514
release {
1615
minifyEnabled false
17-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
16+
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
1817
}
1918
}
2019
lintOptions {
@@ -23,8 +22,8 @@ android {
2322
}
2423

2524
dependencies {
26-
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
27-
api 'androidx.core:core:1.1.0'
25+
api("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version")
26+
api("androidx.core:core:1.1.0")
2827
}
2928

30-
apply from: 'https://raw.githubusercontent.com/Commit451/gradle-android-javadocs/1.0.0/gradle-android-javadocs.gradle'
29+
apply from: "https://raw.githubusercontent.com/Commit451/gradle-android-javadocs/1.1.0/gradle-android-javadocs.gradle"

translationviewdraghelper/src/main/java/com/commit451/translationviewdraghelper/TranslationViewDragHelper.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
247247
*
248248
* @see .STATE_SETTLING
249249
*/
250-
fun onViewDragStateChanged(state: Int) {}
250+
open fun onViewDragStateChanged(state: Int) {}
251251

252252
/**
253253
* Called when the captured view's position changes as the result of a drag or settle.
@@ -258,7 +258,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
258258
* @param dx Change in X position from the last call
259259
* @param dy Change in Y position from the last call
260260
*/
261-
fun onViewPositionChanged(changedView: View?, left: Int, top: Int, dx: Int, dy: Int) {}
261+
open fun onViewPositionChanged(changedView: View?, left: Int, top: Int, dx: Int, dy: Int) {}
262262

263263
/**
264264
* Called when a child view is captured for dragging or settling. The ID of the pointer
@@ -269,7 +269,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
269269
* @param capturedChild Child view that was captured
270270
* @param activePointerId Pointer id tracking the child capture
271271
*/
272-
fun onViewCaptured(capturedChild: View, activePointerId: Int) {}
272+
open fun onViewCaptured(capturedChild: View, activePointerId: Int) {}
273273

274274
/**
275275
* Called when the child view is no longer being actively dragged.
@@ -290,7 +290,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
290290
* @param xvel X velocity of the pointer as it left the screen in pixels per second.
291291
* @param yvel Y velocity of the pointer as it left the screen in pixels per second.
292292
*/
293-
fun onViewReleased(releasedChild: View?, xvel: Float, yvel: Float) {}
293+
open fun onViewReleased(releasedChild: View?, xvel: Float, yvel: Float) {}
294294

295295
/**
296296
* Called when one of the subscribed edges in the parent view has been touched
@@ -306,7 +306,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
306306
*
307307
* @see .EDGE_BOTTOM
308308
*/
309-
fun onEdgeTouched(edgeFlags: Int, pointerId: Int) {}
309+
open fun onEdgeTouched(edgeFlags: Int, pointerId: Int) {}
310310

311311
/**
312312
* Called when the given edge may become locked. This can happen if an edge drag
@@ -317,7 +317,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
317317
* @param edgeFlags A combination of edge flags describing the edge(s) locked
318318
* @return true to lock the edge, false to leave it unlocked
319319
*/
320-
fun onEdgeLock(edgeFlags: Int): Boolean {
320+
open fun onEdgeLock(edgeFlags: Int): Boolean {
321321
return false
322322
}
323323

@@ -335,15 +335,15 @@ private constructor(context: Context, private val parentView: ViewGroup, private
335335
*
336336
* @see .EDGE_BOTTOM
337337
*/
338-
fun onEdgeDragStarted(edgeFlags: Int, pointerId: Int) {}
338+
open fun onEdgeDragStarted(edgeFlags: Int, pointerId: Int) {}
339339

340340
/**
341341
* Called to determine the Z-order of child views.
342342
*
343343
* @param index the ordered position to query for
344344
* @return index of the view that should be ordered at position `index`
345345
*/
346-
fun getOrderedChildIndex(index: Int): Int {
346+
open fun getOrderedChildIndex(index: Int): Int {
347347
return index
348348
}
349349

@@ -354,7 +354,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
354354
* @param child Child view to check
355355
* @return range of horizontal motion in pixels
356356
*/
357-
fun getViewHorizontalDragRange(child: View): Int {
357+
open fun getViewHorizontalDragRange(child: View): Int {
358358
return 0
359359
}
360360

@@ -365,7 +365,7 @@ private constructor(context: Context, private val parentView: ViewGroup, private
365365
* @param child Child view to check
366366
* @return range of vertical motion in pixels
367367
*/
368-
fun getViewVerticalDragRange(child: View): Int {
368+
open fun getViewVerticalDragRange(child: View): Int {
369369
return 0
370370
}
371371

@@ -1470,4 +1470,4 @@ private constructor(context: Context, private val parentView: ViewGroup, private
14701470
}
14711471
return true
14721472
}
1473-
}
1473+
}

0 commit comments

Comments
 (0)