mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 20:48:56 +01:00
Added animation
This commit is contained in:
19
app/src/main/java/eu/kanade/tachiyomi/util/ViewExtensions.kt
Normal file
19
app/src/main/java/eu/kanade/tachiyomi/util/ViewExtensions.kt
Normal file
@@ -0,0 +1,19 @@
|
||||
package eu.kanade.tachiyomi.util
|
||||
|
||||
import android.graphics.Point
|
||||
import android.view.View
|
||||
|
||||
/**
|
||||
* Returns coordinates of view.
|
||||
* Used for animation
|
||||
*
|
||||
* @return coordinates of view
|
||||
*/
|
||||
fun View.getCoordinates(): Point
|
||||
{
|
||||
var cx = (this.left + this.right) / 2;
|
||||
var cy = (this.top + this.bottom) / 2;
|
||||
|
||||
return Point(cx, cy)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user