From 2442e779857e7eda253aadcb1c4dff5ccb3e53f4 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Fri, 24 Jun 2011 14:19:59 +0900 Subject: Display suggested word info in debug mode Bug: 4686782 Change-Id: I0e5bef33aa39c3d6f75edda7818524965aa40b79 --- .../android/inputmethod/compat/FrameLayoutCompatUtils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java') 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); + } + } } -- cgit v1.2.3-83-g751a