(final @NonNull View v)
| 41 | } |
| 42 | |
| 43 | public static float getY(final @NonNull View v) { |
| 44 | if (Build.VERSION.SDK_INT >= 11) { |
| 45 | return ViewCompat.getY(v); |
| 46 | } else { |
| 47 | return ((ViewGroup.MarginLayoutParams) v.getLayoutParams()).topMargin; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | public static float getX(final @NonNull View v) { |
| 52 | if (Build.VERSION.SDK_INT >= 11) { |