mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-12-28 00:48:56 +01:00
81803c406a
KeyValue defines an ADT and some of its values, it now contains public final fields and no internal logic. KeyModifier handles modifiers and accents and creates new instances of KeyValue when needed. This operation is now properly cached.
27 lines
776 B
Java
27 lines
776 B
Java
package juloo.keyboard2;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.LinearLayout.LayoutParams;
|
|
|
|
public class EmojiGroupButtonsBar extends LinearLayout
|
|
{
|
|
public EmojiGroupButtonsBar(Context context, AttributeSet attrs)
|
|
{
|
|
super(context, attrs);
|
|
Emoji.init(context.getResources());
|
|
add_group(EmojiGridView.GROUP_LAST_USE, "\uD83D\uDD59");
|
|
for (int i = 0; i < Emoji.num_groups; i++)
|
|
{
|
|
Emoji first = Emoji.getEmojisByGroup(i)[0];
|
|
add_group(i, first.symbol);
|
|
}
|
|
}
|
|
|
|
private void add_group(int id, String symbol)
|
|
{
|
|
addView(new EmojiTypeButton(getContext(), id, symbol), new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1.f));
|
|
}
|
|
}
|