diff options
author | 2011-06-24 14:19:59 +0900 | |
---|---|---|
committer | 2011-06-24 14:19:59 +0900 | |
commit | 2442e779857e7eda253aadcb1c4dff5ccb3e53f4 (patch) | |
tree | c24d65436d7c920210fa045f3db727a0ccd155d6 /java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java | |
parent | 703e7252bae287d2d43265532d2003334bf16210 (diff) | |
download | latinime-2442e779857e7eda253aadcb1c4dff5ccb3e53f4.tar.gz latinime-2442e779857e7eda253aadcb1c4dff5ccb3e53f4.tar.xz latinime-2442e779857e7eda253aadcb1c4dff5ccb3e53f4.zip |
Display suggested word info in debug mode
Bug: 4686782
Change-Id: I0e5bef33aa39c3d6f75edda7818524965aa40b79
Diffstat (limited to 'java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java b/java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java index 46499f19a..523bf7d0e 100644 --- a/java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java +++ b/java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java @@ -16,6 +16,7 @@ package com.android.inputmethod.compat; +import android.view.View; import android.view.ViewGroup; import android.view.ViewGroup.MarginLayoutParams; import android.widget.FrameLayout; @@ -49,4 +50,14 @@ public class FrameLayoutCompatUtils { + placer.getClass().getName()); } } + + public static void placeViewAt(View view, int x, int y, int w, int h) { + final ViewGroup.LayoutParams lp = view.getLayoutParams(); + if (lp instanceof MarginLayoutParams) { + final MarginLayoutParams marginLayoutParams = (MarginLayoutParams)lp; + marginLayoutParams.width = w; + marginLayoutParams.height = h; + marginLayoutParams.setMargins(x, y, 0, 0); + } + } } |