use of net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleDividerItem in project Osmand by osmandapp.
the class SelectedPointBottomSheetDialogFragment method createMenuItems.
@Override
public void createMenuItems(Bundle savedInstanceState) {
BaseBottomSheetItem titleItem = new BottomSheetItemWithDescription.Builder().setDescription(getDescription()).setIcon(getActiveIcon(R.drawable.ic_action_measure_point)).setTitle(getTitle()).setLayoutId(R.layout.bottom_sheet_item_with_descr_56dp).create();
items.add(titleItem);
items.add(new TitleDividerItem(getContext()));
BaseBottomSheetItem moveItem = new SimpleBottomSheetItem.Builder().setIcon(getContentIcon(R.drawable.ic_action_move_point)).setTitle(getString(R.string.shared_string_move)).setLayoutId(R.layout.bottom_sheet_item_simple).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.moveOnClick();
}
dismiss();
}
}).create();
items.add(moveItem);
BaseBottomSheetItem deleteItem = new SimpleBottomSheetItem.Builder().setIcon(getContentIcon(R.drawable.ic_action_remove_dark)).setTitle(getString(R.string.shared_string_delete)).setLayoutId(R.layout.bottom_sheet_item_simple).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.deleteOnClick();
}
dismiss();
}
}).create();
items.add(deleteItem);
items.add(new DividerHalfItem(getContext()));
BaseBottomSheetItem addAfterItem = new SimpleBottomSheetItem.Builder().setIcon(getContentIcon(R.drawable.ic_action_addpoint_above)).setTitle(getString(R.string.add_point_after)).setLayoutId(R.layout.bottom_sheet_item_simple).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.addPointAfterOnClick();
}
dismiss();
}
}).create();
items.add(addAfterItem);
BaseBottomSheetItem addBeforeItem = new SimpleBottomSheetItem.Builder().setIcon(getContentIcon(R.drawable.ic_action_addpoint_below)).setTitle(getString(R.string.add_point_before)).setLayoutId(R.layout.bottom_sheet_item_simple).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (listener != null) {
listener.addPointBeforeOnClick();
}
dismiss();
}
}).create();
items.add(addBeforeItem);
}
Aggregations