use of net.studymongolian.mongollibrary.MongolMenuItem in project mongol-library by suragch.
the class MongolMenuActivity method onNoIconsClick.
public void onNoIconsClick(View view) {
MongolMenu menu = new MongolMenu(this);
menu.add(new MongolMenuItem("ᠨᠢᠭᠡ"));
menu.add(new MongolMenuItem("ᠬᠤᠶᠠᠷ"));
menu.add(new MongolMenuItem("ᠭᠤᠷᠪᠠ"));
menu.setOnMenuItemClickListener(new MongolMenu.OnMenuItemClickListener() {
public boolean onMenuItemClick(MongolMenuItem item) {
MongolToast.makeText(MongolMenuActivity.this, item.getTitle(), MongolToast.LENGTH_SHORT).show();
return true;
}
});
menu.showAsDropDown(view, 0, 0);
}
use of net.studymongolian.mongollibrary.MongolMenuItem in project mongol-library by suragch.
the class MongolMenuActivity method getMenu.
private MongolMenu getMenu() {
MongolMenu menu = new MongolMenu(this);
menu.add(new MongolMenuItem("ᠨᠢᠭᠡ", R.drawable.ic_sun));
menu.add(new MongolMenuItem("ᠬᠤᠶᠠᠷ", R.drawable.ic_moon));
menu.add(new MongolMenuItem("ᠭᠤᠷᠪᠠ", R.drawable.ic_star));
menu.setOnMenuItemClickListener(new MongolMenu.OnMenuItemClickListener() {
public boolean onMenuItemClick(MongolMenuItem item) {
MongolToast.makeText(MongolMenuActivity.this, item.getTitle(), MongolToast.LENGTH_SHORT).show();
return true;
}
});
return menu;
}
use of net.studymongolian.mongollibrary.MongolMenuItem in project mongol-library by suragch.
the class MongolEditTextActivity method getMongolEditTextContextMenu.
@Override
public MongolMenu getMongolEditTextContextMenu(MongolEditText met) {
// This is a demo menu only
// You will need to implement your own functionality
// See the MongolEditText source code for examples
MongolMenu menu = new MongolMenu(this);
menu.add(new MongolMenuItem("ᠨᠢᠭᠡ", R.drawable.ic_sun));
menu.add(new MongolMenuItem("ᠬᠤᠶᠠᠷ", R.drawable.ic_moon));
menu.add(new MongolMenuItem("ᠭᠤᠷᠪᠠ", R.drawable.ic_star));
menu.setOnMenuItemClickListener(new MongolMenu.OnMenuItemClickListener() {
public boolean onMenuItemClick(MongolMenuItem item) {
MongolToast.makeText(MongolEditTextActivity.this, item.getTitle(), MongolToast.LENGTH_SHORT).show();
return true;
}
});
return menu;
}
Aggregations