Loading java/res/layout/emoji_palettes_view.xml +15 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ android:layout_width="2dip" android:layout_height="match_parent" android:background="@drawable/suggestions_strip_divider" /> <!-- TODO: Implement KeyView and replace this. --> <ImageButton android:id="@+id/emoji_keyboard_delete" android:layout_width="0dip" Loading @@ -83,18 +84,30 @@ android:layout_height="0dip" android:layout_weight="1" > <!-- TODO: Implement a KeyView and replace this. --> <TextView android:id="@+id/emoji_keyboard_alphabet_left" android:layout_width="0dip" android:layout_weight="0.15" android:gravity="center" android:layout_height="match_parent" /> <ImageButton <!-- TODO: Implement KeyView and replace this. --> <RelativeLayout android:id="@+id/emoji_keyboard_space" android:layout_width="0dip" android:layout_weight="0.70" android:layout_height="match_parent" android:contentDescription="@string/spoken_description_space"/> android:contentDescription="@string/spoken_description_space"> <!-- WORKAROUND: Show the spacebar icon as a bacground of this View. --> <View android:id="@+id/emoji_keyboard_space_icon" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="12dp" android:layout_marginRight="12dp" android:layout_centerInParent="true" /> </RelativeLayout> <!-- TODO: Implement KeyView and replace this. --> <TextView android:id="@+id/emoji_keyboard_alphabet_right" android:layout_width="0dip" Loading java/src/com/android/inputmethod/keyboard/emoji/EmojiLayoutParams.java +3 −4 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.emoji; import android.content.res.Resources; import android.support.v4.view.ViewPager; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import com.android.inputmethod.latin.R; Loading Loading @@ -84,10 +83,10 @@ final class EmojiLayoutParams { ll.setLayoutParams(lp); } public void setKeyProperties(final ImageView ib) { final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) ib.getLayoutParams(); public void setKeyProperties(final View v) { final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) v.getLayoutParams(); lp.leftMargin = mKeyHorizontalGap / 2; lp.rightMargin = mKeyHorizontalGap / 2; ib.setLayoutParams(lp); v.setLayoutParams(lp); } } java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java +7 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,9 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange private ImageButton mDeleteKey; private TextView mAlphabetKeyLeft; private TextView mAlphabetKeyRight; private ImageButton mSpacebar; private View mSpacebar; // TODO: Remove this workaround. private View mSpacebarIcon; private TabHost mTabHost; private ViewPager mEmojiPager; private int mCurrentPagerPosition = 0; Loading Loading @@ -221,12 +223,13 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange mAlphabetKeyRight.setTag(Constants.CODE_ALPHA_FROM_EMOJI); mAlphabetKeyRight.setOnTouchListener(this); mAlphabetKeyRight.setOnClickListener(this); mSpacebar = (ImageButton)findViewById(R.id.emoji_keyboard_space); mSpacebar = findViewById(R.id.emoji_keyboard_space); mSpacebar.setBackgroundResource(mSpacebarBackgroundId); mSpacebar.setTag(Constants.CODE_SPACE); mSpacebar.setOnTouchListener(this); mSpacebar.setOnClickListener(this); mEmojiLayoutParams.setKeyProperties(mSpacebar); mSpacebarIcon = findViewById(R.id.emoji_keyboard_space_icon); } @Override Loading Loading @@ -375,7 +378,8 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange } final int spacebarResId = iconSet.getIconResourceId(KeyboardIconsSet.NAME_SPACE_KEY); if (spacebarResId != 0) { mSpacebar.setImageResource(spacebarResId); // TODO: Remove this workaround to place the spacebar icon. mSpacebarIcon.setBackgroundResource(spacebarResId); } final KeyDrawParams params = new KeyDrawParams(); params.updateParams(mEmojiLayoutParams.getActionBarHeight(), keyVisualAttr); Loading Loading
java/res/layout/emoji_palettes_view.xml +15 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ android:layout_width="2dip" android:layout_height="match_parent" android:background="@drawable/suggestions_strip_divider" /> <!-- TODO: Implement KeyView and replace this. --> <ImageButton android:id="@+id/emoji_keyboard_delete" android:layout_width="0dip" Loading @@ -83,18 +84,30 @@ android:layout_height="0dip" android:layout_weight="1" > <!-- TODO: Implement a KeyView and replace this. --> <TextView android:id="@+id/emoji_keyboard_alphabet_left" android:layout_width="0dip" android:layout_weight="0.15" android:gravity="center" android:layout_height="match_parent" /> <ImageButton <!-- TODO: Implement KeyView and replace this. --> <RelativeLayout android:id="@+id/emoji_keyboard_space" android:layout_width="0dip" android:layout_weight="0.70" android:layout_height="match_parent" android:contentDescription="@string/spoken_description_space"/> android:contentDescription="@string/spoken_description_space"> <!-- WORKAROUND: Show the spacebar icon as a bacground of this View. --> <View android:id="@+id/emoji_keyboard_space_icon" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="12dp" android:layout_marginRight="12dp" android:layout_centerInParent="true" /> </RelativeLayout> <!-- TODO: Implement KeyView and replace this. --> <TextView android:id="@+id/emoji_keyboard_alphabet_right" android:layout_width="0dip" Loading
java/src/com/android/inputmethod/keyboard/emoji/EmojiLayoutParams.java +3 −4 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.inputmethod.keyboard.emoji; import android.content.res.Resources; import android.support.v4.view.ViewPager; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import com.android.inputmethod.latin.R; Loading Loading @@ -84,10 +83,10 @@ final class EmojiLayoutParams { ll.setLayoutParams(lp); } public void setKeyProperties(final ImageView ib) { final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) ib.getLayoutParams(); public void setKeyProperties(final View v) { final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) v.getLayoutParams(); lp.leftMargin = mKeyHorizontalGap / 2; lp.rightMargin = mKeyHorizontalGap / 2; ib.setLayoutParams(lp); v.setLayoutParams(lp); } }
java/src/com/android/inputmethod/keyboard/emoji/EmojiPalettesView.java +7 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,9 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange private ImageButton mDeleteKey; private TextView mAlphabetKeyLeft; private TextView mAlphabetKeyRight; private ImageButton mSpacebar; private View mSpacebar; // TODO: Remove this workaround. private View mSpacebarIcon; private TabHost mTabHost; private ViewPager mEmojiPager; private int mCurrentPagerPosition = 0; Loading Loading @@ -221,12 +223,13 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange mAlphabetKeyRight.setTag(Constants.CODE_ALPHA_FROM_EMOJI); mAlphabetKeyRight.setOnTouchListener(this); mAlphabetKeyRight.setOnClickListener(this); mSpacebar = (ImageButton)findViewById(R.id.emoji_keyboard_space); mSpacebar = findViewById(R.id.emoji_keyboard_space); mSpacebar.setBackgroundResource(mSpacebarBackgroundId); mSpacebar.setTag(Constants.CODE_SPACE); mSpacebar.setOnTouchListener(this); mSpacebar.setOnClickListener(this); mEmojiLayoutParams.setKeyProperties(mSpacebar); mSpacebarIcon = findViewById(R.id.emoji_keyboard_space_icon); } @Override Loading Loading @@ -375,7 +378,8 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange } final int spacebarResId = iconSet.getIconResourceId(KeyboardIconsSet.NAME_SPACE_KEY); if (spacebarResId != 0) { mSpacebar.setImageResource(spacebarResId); // TODO: Remove this workaround to place the spacebar icon. mSpacebarIcon.setBackgroundResource(spacebarResId); } final KeyDrawParams params = new KeyDrawParams(); params.updateParams(mEmojiLayoutParams.getActionBarHeight(), keyVisualAttr); Loading