MCPcopy Create free account
hub / github.com/InsightIM/Tok-Android / setY

Method setY

app/src/main/java/com/client/tok/utils/ViewUtil.java:32–41  ·  view source on GitHub ↗
(final @NonNull View v, final int y)

Source from the content-addressed store, hash-verified

30 }
31
32 public static void setY(final @NonNull View v, final int y) {
33 if (Build.VERSION.SDK_INT >= 11) {
34 ViewCompat.setY(v, y);
35 } else {
36 ViewGroup.MarginLayoutParams params =
37 (ViewGroup.MarginLayoutParams) v.getLayoutParams();
38 params.topMargin = y;
39 v.setLayoutParams(params);
40 }
41 }
42
43 public static float getY(final @NonNull View v) {
44 if (Build.VERSION.SDK_INT >= 11) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected