forked from extern/Unexpected-Keyboard
Fix crash + Fix emoji type buttons
This commit is contained in:
parent
2c859f30a6
commit
ed53b1a23b
@ -8,82 +8,52 @@
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
android:text="\uD83D\uDD59"
|
||||
emoji_type="LAST_USE"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
android:text="\uD83D\uDE03"
|
||||
emoji_type="EMOTICONS"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
android:text="\uD83D\uDE8C"
|
||||
emoji_type="TRANSPORT"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
emoji_type="FOOD"
|
||||
android:text="\uD83C\uDF55"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
emoji_type="NATURE"
|
||||
android:text="\uD83C\uDF37"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
emoji_type="FEST"
|
||||
android:text="\uD83C\uDF88"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
emoji_type="ANIMAL"
|
||||
android:text="\uD83D\uDC31"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
emoji_type="HUMAN"
|
||||
android:text="\uD83D\uDC9C"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
emoji_type="UNCATEGORIZED"
|
||||
android:text="\uD83D\uDCA5"
|
||||
/>
|
||||
<juloo.keyboard2.EmojiTypeButton
|
||||
android:layout_width="0px"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:padding="0px"
|
||||
style="@style/emojiTypeButton"
|
||||
emoji_type="DINGBATS"
|
||||
android:text="\u2705"
|
||||
/>
|
||||
@ -91,6 +61,7 @@
|
||||
<juloo.keyboard2.EmojiGridView
|
||||
android:id="@+id/emoji_grid"
|
||||
android:background="@color/bg"
|
||||
android:textColor="@color/emoji_key_text"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="@dimen/emoji_grid_height"
|
||||
/>
|
||||
|
12
res/values/styles.xml
Normal file
12
res/values/styles.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="emojiTypeButton">
|
||||
<item name="android:layout_width">0px</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:padding">0px</item>
|
||||
<item name="android:background">@color/emoji_button_bg</item>
|
||||
<item name="android:textColor">@color/emoji_key_text</item>
|
||||
<item name="android:textSize">@dimen/label_text_size</item>
|
||||
</style>
|
||||
</resources>
|
@ -111,7 +111,7 @@ public class EmojiGridView extends GridView
|
||||
emoji = Emoji.getEmojiByName(data[1]);
|
||||
if (emoji == null)
|
||||
continue ;
|
||||
_lastUsed.put(emoji, Integer.getInteger(data[0]));
|
||||
_lastUsed.put(emoji, Integer.valueOf(data[0]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,8 +15,7 @@ public class EmojiTypeButton extends Button
|
||||
|
||||
public EmojiTypeButton(Context context, AttributeSet attrs)
|
||||
{
|
||||
super(context);
|
||||
setBackgroundColor(getResources().getColor(R.color.emoji_button_bg));
|
||||
super(context, attrs);
|
||||
setOnTouchListener(this);
|
||||
_emojiType = getTypeByString(attrs.getAttributeValue(null, "emoji_type"));
|
||||
}
|
||||
|
@ -94,11 +94,6 @@ class KeyValue
|
||||
return (_flags);
|
||||
}
|
||||
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
return (o instanceof KeyValue && ((KeyValue)o).getName().equals(_name));
|
||||
}
|
||||
|
||||
private static HashMap<String, KeyValue> keys = new HashMap<String, KeyValue>();
|
||||
|
||||
protected KeyValue(String name, String symbol, char c, int eventCode, int flags)
|
||||
|
Loading…
Reference in New Issue
Block a user