Fix landscape UI
This commit is contained in:
parent
046737ee41
commit
98538c6efe
3 changed files with 91 additions and 110 deletions
|
@ -16,95 +16,85 @@
|
||||||
android:background="?attr/left_menu_view_bg"
|
android:background="?attr/left_menu_view_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/plan_route_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dashboard_map_toolbar"
|
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||||
tools:background="@color/actionbar_dark_color">
|
android:background="?attr/bg_color"
|
||||||
|
app:contentInsetLeft="54dp"
|
||||||
|
app:contentInsetStart="54dp">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<LinearLayout
|
||||||
android:id="@+id/plan_route_toolbar"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:contentInsetLeft="54dp"
|
android:gravity="center_vertical"
|
||||||
app:contentInsetStart="54dp">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/markers_distance_text_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginEnd="@dimen/measurement_tool_text_margin_small"
|
|
||||||
android:layout_marginLeft="@dimen/measurement_tool_text_margin"
|
|
||||||
android:layout_marginRight="@dimen/measurement_tool_text_margin_small"
|
|
||||||
android:layout_marginStart="@dimen/measurement_tool_text_margin"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textAppearance="@style/TextAppearance.ListItemTitle"
|
|
||||||
tools:text="1.39 km,"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/markers_time_text_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="?android:textColorSecondary"
|
|
||||||
android:textSize="@dimen/default_list_text_size"
|
|
||||||
tools:text="~ 45 min."/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/markers_count_text_view"
|
android:id="@+id/markers_distance_text_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginEnd="@dimen/measurement_tool_text_margin_small"
|
||||||
|
android:layout_marginRight="@dimen/measurement_tool_text_margin_small"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAppearance="@style/TextAppearance.ListItemTitle"
|
||||||
|
tools:text="1.39 km,"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/markers_time_text_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginLeft="@dimen/measurement_tool_text_margin"
|
|
||||||
android:layout_marginStart="@dimen/measurement_tool_text_margin"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="?android:textColorSecondary"
|
android:textColor="?android:textColorSecondary"
|
||||||
android:textSize="@dimen/default_sub_text_size"
|
android:textSize="@dimen/default_list_text_size"
|
||||||
tools:text="3 markers"/>
|
tools:text="~ 45 min."/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<TextView
|
||||||
android:id="@+id/options_button"
|
android:id="@+id/markers_count_text_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:layout_gravity="center_vertical"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:paddingLeft="16dp"
|
android:textColor="?android:textColorSecondary"
|
||||||
android:paddingRight="16dp"
|
android:textSize="@dimen/default_sub_text_size"
|
||||||
android:text="@string/shared_string_options"
|
tools:text="3 markers"/>
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textColor="@color/color_white"
|
|
||||||
android:textSize="@dimen/default_list_text_size"
|
|
||||||
osmand:typeface="@string/font_roboto_regular"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.v7.widget.Toolbar>
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
|
android:id="@+id/options_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:text="@string/shared_string_options"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?attr/color_dialog_buttons"
|
||||||
|
android:textSize="@dimen/default_list_text_size"
|
||||||
|
osmand:typeface="@string/font_roboto_medium"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.v7.widget.Toolbar>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/snap_to_road_progress_bar"
|
android:id="@+id/snap_to_road_progress_bar"
|
||||||
|
|
|
@ -2,60 +2,54 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:osmand="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:osmand="http://schemas.android.com/tools"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.design.widget.AppBarLayout
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/map_markers_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dashboard_map_toolbar">
|
android:layout_height="@dimen/dashboard_map_toolbar"
|
||||||
|
app:contentInsetLeft="54dp"
|
||||||
|
app:contentInsetStart="54dp">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<LinearLayout
|
||||||
android:id="@+id/map_markers_toolbar"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:contentInsetLeft="54dp"
|
android:gravity="center_vertical"
|
||||||
app:contentInsetStart="54dp">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:orientation="horizontal"
|
android:layout_width="0dp"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_vertical">
|
android:layout_weight="1"
|
||||||
|
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"/>
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
<net.osmand.plus.widgets.TextViewEx
|
||||||
android:layout_width="0dp"
|
android:id="@+id/options_button"
|
||||||
android:layout_weight="1"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:ellipsize="end"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:maxLines="1"
|
android:ellipsize="end"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="@string/map_markers"
|
android:maxLines="1"
|
||||||
android:textColor="@color/color_white"
|
android:paddingLeft="16dp"
|
||||||
osmand:typeface="@string/font_roboto_medium"
|
android:paddingRight="16dp"
|
||||||
android:textSize="@dimen/dialog_header_text_size"/>
|
android:text="@string/shared_string_options"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/color_white"
|
||||||
|
android:textSize="@dimen/default_list_text_size"
|
||||||
|
osmand:typeface="@string/font_roboto_regular"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<net.osmand.plus.widgets.TextViewEx
|
</android.support.v7.widget.Toolbar>
|
||||||
android:id="@+id/options_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:paddingRight="16dp"
|
|
||||||
android:paddingLeft="16dp"
|
|
||||||
android:text="@string/shared_string_options"
|
|
||||||
osmand:typeface="@string/font_roboto_regular"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/default_list_text_size"
|
|
||||||
android:textColor="@color/color_white"
|
|
||||||
android:background="?attr/selectableItemBackground"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</android.support.v7.widget.Toolbar>
|
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -233,10 +233,7 @@ public class PlanRouteFragment extends Fragment {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Toolbar toolbar = (Toolbar) mainView.findViewById(R.id.plan_route_toolbar);
|
Toolbar toolbar = (Toolbar) mainView.findViewById(R.id.plan_route_toolbar);
|
||||||
if (nightMode) {
|
toolbar.setNavigationIcon(getContentIcon(R.drawable.ic_arrow_back));
|
||||||
toolbar.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.actionbar_dark_color));
|
|
||||||
}
|
|
||||||
toolbar.setNavigationIcon(iconsCache.getIcon(R.drawable.ic_arrow_back));
|
|
||||||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
Loading…
Reference in a new issue