Added animation

This commit is contained in:
NoodleMage
2016-03-19 15:39:19 +01:00
parent bc473055b9
commit 137c21e6c9
5 changed files with 147 additions and 12 deletions

View 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)
}