am f5be54f7: Merge "Move TypefaceUtils and ViewUtils to utils package"

* commit 'f5be54f710e2855b88f51bfb34b60742ebe3913c':
  Move TypefaceUtils and ViewUtils to utils package
This commit is contained in:
Tadashi G. Takaoka 2013-07-05 03:36:45 -07:00 committed by Android Git Automerger
commit a5424c82a9
7 changed files with 12 additions and 8 deletions

View file

@ -37,6 +37,7 @@ import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.define.ProductionFlag;
import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.TypefaceUtils;
import com.android.inputmethod.research.ResearchLogger;
import java.util.HashSet;

View file

@ -70,7 +70,9 @@ import com.android.inputmethod.latin.utils.CoordinateUtils;
import com.android.inputmethod.latin.utils.ResourceUtils;
import com.android.inputmethod.latin.utils.StaticInnerHandlerWrapper;
import com.android.inputmethod.latin.utils.StringUtils;
import com.android.inputmethod.latin.utils.TypefaceUtils;
import com.android.inputmethod.latin.utils.UsabilityStudyLogUtils;
import com.android.inputmethod.latin.utils.ViewLayoutUtils;
import com.android.inputmethod.research.ResearchLogger;
import java.util.Locale;

View file

@ -29,6 +29,7 @@ import com.android.inputmethod.keyboard.internal.KeyboardParams;
import com.android.inputmethod.keyboard.internal.MoreKeySpec;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.utils.StringUtils;
import com.android.inputmethod.latin.utils.TypefaceUtils;
public final class MoreKeysKeyboard extends Keyboard {
private final int mDefaultKeyCoordX;

View file

@ -24,13 +24,13 @@ import android.graphics.drawable.Drawable;
import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardActionListener;
import com.android.inputmethod.keyboard.TypefaceUtils;
import com.android.inputmethod.keyboard.internal.KeyboardBuilder;
import com.android.inputmethod.keyboard.internal.KeyboardIconsSet;
import com.android.inputmethod.keyboard.internal.KeyboardParams;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import com.android.inputmethod.latin.utils.TypefaceUtils;
public final class MoreSuggestions extends Keyboard {
public static final int SUGGESTION_CODE_BASE = 1024;

View file

@ -45,12 +45,12 @@ import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.inputmethod.keyboard.ViewLayoutUtils;
import com.android.inputmethod.latin.AutoCorrection;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.utils.ResourceUtils;
import com.android.inputmethod.latin.utils.ViewLayoutUtils;
import java.util.ArrayList;

View file

@ -14,15 +14,13 @@
* limitations under the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.latin.utils;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.util.SparseArray;
import com.android.inputmethod.latin.utils.CollectionUtils;
public final class TypefaceUtils {
private TypefaceUtils() {
// This utility class is not publicly instantiable.

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.android.inputmethod.keyboard;
package com.android.inputmethod.latin.utils;
import android.view.View;
import android.view.ViewGroup;
@ -27,7 +27,8 @@ public final class ViewLayoutUtils {
// This utility class is not publicly instantiable.
}
public static MarginLayoutParams newLayoutParam(ViewGroup placer, int width, int height) {
public static MarginLayoutParams newLayoutParam(final ViewGroup placer, final int width,
final int height) {
if (placer instanceof FrameLayout) {
return new FrameLayout.LayoutParams(width, height);
} else if (placer instanceof RelativeLayout) {
@ -40,7 +41,8 @@ public final class ViewLayoutUtils {
}
}
public static void placeViewAt(View view, int x, int y, int w, int h) {
public static void placeViewAt(final View view, final int x, final int y, final int w,
final int h) {
final ViewGroup.LayoutParams lp = view.getLayoutParams();
if (lp instanceof MarginLayoutParams) {
final MarginLayoutParams marginLayoutParams = (MarginLayoutParams)lp;