Show options menu above the action bar
This commit is contained in:
parent
ddd0b41d2a
commit
e852eb809e
2 changed files with 46 additions and 45 deletions
|
@ -7,50 +7,56 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||
android:background="?attr/actionModeBackground">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/map_markers_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
||||
app:contentInsetLeft="54dp"
|
||||
app:contentInsetStart="54dp">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/map_markers"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/dialog_header_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/ctx_menu_info_view_bg">
|
||||
android:layout_weight="1">
|
||||
|
||||
<!-- Coordinator layout is needed in order to display the snackbar above the bottom navigation -->
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<net.osmand.plus.LockableViewPager
|
||||
android:id="@+id/map_markers_view_pager"
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||
android:background="?attr/actionModeBackground">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/map_markers_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
||||
app:contentInsetLeft="54dp"
|
||||
app:contentInsetStart="54dp">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:text="@string/map_markers"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/dialog_header_text_size"
|
||||
osmand:typeface="@string/font_roboto_medium"/>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<!-- Coordinator layout is needed in order to display the snackbar above the bottom navigation -->
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/ctx_menu_info_view_bg">
|
||||
|
||||
<net.osmand.plus.LockableViewPager
|
||||
android:id="@+id/map_markers_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/menu_container"
|
||||
|
@ -58,13 +64,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/shadow_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:alpha="0.5"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/bg_shadow_onmap"/>
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
|
@ -76,4 +75,5 @@
|
|||
app:itemIconTint="@color/bottom_navigation_color_selector_light"
|
||||
app:itemTextColor="@color/bottom_navigation_color_selector_light"
|
||||
app:menu="@menu/map_markers_bottom_navigation"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -180,7 +180,8 @@ public class OptionsBottomSheetDialogFragment extends BottomSheetDialogFragment
|
|||
int scrH = AndroidUtils.getScreenHeight(activity);
|
||||
int stBarH = AndroidUtils.getStatusBarHeight(activity);
|
||||
int nBarH = AndroidUtils.getNavBarHeight(activity);
|
||||
return scrH - stBarH - nBarH - getResources().getDimensionPixelSize(R.dimen.dashboard_map_toolbar) - AndroidUtils.dpToPx(activity, 56);
|
||||
// 56dp below is height of the bottom navigation view
|
||||
return scrH - stBarH - nBarH - AndroidUtils.dpToPx(activity, 56);
|
||||
}
|
||||
|
||||
interface MarkerOptionsFragmentListener {
|
||||
|
|
Loading…
Reference in a new issue