use of net.osmand.plus.mapcontextmenu.other.ShareMenu.ShareItem in project Osmand by osmandapp.
the class ShareMenuFragment method createMenuItems.
@Override
public void createMenuItems(Bundle savedInstanceState) {
items.add(new TitleItem(getString(R.string.share_menu_location)));
View.OnClickListener itemOnClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
menu.share((ShareItem) v.getTag());
}
};
for (ShareItem shareItem : menu.getItems()) {
BaseBottomSheetItem item = new SimpleBottomSheetItem.Builder().setIcon(getContentIcon(shareItem.getIconResourceId())).setTitle(getString(shareItem.getTitleResourceId())).setLayoutId(R.layout.bottom_sheet_item_simple).setOnClickListener(itemOnClickListener).setTag(shareItem).create();
items.add(item);
}
}
Aggregations