Search in sources :

Example 16 with TitleItem

use of net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem in project Osmand by osmandapp.

the class SortByMenuBottomSheetDialogFragment method createMenuItems.

@Override
public void createMenuItems(Bundle savedInstanceState) {
    items.add(new TitleItem(getString(R.string.shared_string_sort)));
    BaseBottomSheetItem byTypeItem = new SimpleBottomSheetItem.Builder().setIcon(getContentIcon(R.drawable.ic_groped_by_type)).setTitle(getString(R.string.by_type)).setLayoutId(R.layout.bottom_sheet_item_simple).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            selectSortByMode(NotesSortByMode.BY_TYPE);
        }
    }).create();
    items.add(byTypeItem);
    BaseBottomSheetItem byDateItem = new SimpleBottomSheetItem.Builder().setIcon(getContentIcon(R.drawable.ic_action_sort_by_date)).setTitle(getString(R.string.by_date)).setLayoutId(R.layout.bottom_sheet_item_simple).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            selectSortByMode(NotesSortByMode.BY_DATE);
        }
    }).create();
    items.add(byDateItem);
}
Also used : BaseBottomSheetItem(net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem) SimpleBottomSheetItem(net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem) TitleItem(net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem) View(android.view.View)

Aggregations

View (android.view.View)16 TitleItem (net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem)16 BaseBottomSheetItem (net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem)15 SimpleBottomSheetItem (net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem)10 DividerHalfItem (net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerHalfItem)7 Bundle (android.os.Bundle)5 BottomSheetItemWithCompoundButton (net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton)4 DescriptionItem (net.osmand.plus.base.bottomsheetmenu.simpleitems.DescriptionItem)4 Drawable (android.graphics.drawable.Drawable)3 BottomSheetItemWithDescription (net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithDescription)3 ContextThemeWrapper (android.view.ContextThemeWrapper)2 ImageView (android.widget.ImageView)2 SubtitleDividerItem (net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitleDividerItem)2 SubtitleItem (net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitleItem)2 Context (android.content.Context)1 DialogInterface (android.content.DialogInterface)1 AlertDialog (android.support.v7.app.AlertDialog)1 ListPopupWindow (android.support.v7.widget.ListPopupWindow)1 MotionEvent (android.view.MotionEvent)1 AdapterView (android.widget.AdapterView)1