Create and use SubtitleDividerItem

This commit is contained in:
alex 2018-03-01 19:11:45 +02:00
parent 2e4b15a3c4
commit 3824b06594
2 changed files with 26 additions and 2 deletions

View file

@ -0,0 +1,24 @@
package net.osmand.plus.base.bottomsheetmenu.simpleitems;
import android.content.Context;
import android.support.annotation.ColorRes;
public class SubtitleDividerItem extends DividerItem {
public SubtitleDividerItem(Context context) {
super(context);
}
public SubtitleDividerItem(Context context, @ColorRes int colorId) {
super(context, colorId);
}
public SubtitleDividerItem(Context context, @ColorRes int colorId, int position) {
super(context, colorId, position);
}
@Override
protected int getBottomMargin(Context context) {
return 0;
}
}

View file

@ -10,7 +10,7 @@ import net.osmand.plus.base.MenuBottomSheetDialogFragment;
import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.BottomSheetItemWithCompoundButton;
import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitleDividerItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.SubtitleItem;
import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
import net.osmand.plus.helpers.AndroidUiHelper;
@ -85,7 +85,7 @@ public class PlanRouteOptionsBottomSheetDialogFragment extends MenuBottomSheetDi
.create();
items.add(roundTripItem);
items.add(new DividerItem(getContext()));
items.add(new SubtitleDividerItem(getContext()));
items.add(new SubtitleItem(getString(R.string.sort_by)));