Delete an unnecessary fragment

This commit is contained in:
Alexander Sytnyk 2017-06-30 11:48:13 +03:00
parent ceff91fb31
commit e4f38598a1
5 changed files with 398 additions and 418 deletions

View file

@ -1,414 +1,428 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mapillary_filters_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/toggle_row"
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/shadow_on_map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="60dp"
tools:layout_height="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/toggle_row_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_margin="16dp"
tools:src="@drawable/ic_action_gabout_dark" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/toggle_row_toggle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:focusable="false" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/toggle_row_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/toggle_row_icon"
android:layout_toLeftOf="@id/toggle_row_toggle"
android:layout_toRightOf="@+id/toggle_row_icon"
android:layout_toStartOf="@id/toggle_row_toggle"
android:textAppearance="@style/TextAppearance.ListItemTitle"
tools:text="Some title text" />
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_marginTop="12dp"
android:layout_toEndOf="@+id/toggle_row_icon"
android:layout_toRightOf="@+id/toggle_row_icon"
android:background="?attr/dashboard_divider" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/mapillary_filters_tile_cache_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_margin="16dp"
tools:src="@drawable/ic_layer_top_dark" />
<Button
android:id="@+id/button_reload_tile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:background="?attr/selectableItemBackground"
android:gravity="end|center_vertical"
android:minWidth="0dp"
android:text="@string/shared_string_reload"
android:textAlignment="textEnd"
android:textColor="?attr/color_dialog_buttons" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_toEndOf="@+id/mapillary_filters_tile_cache_icon"
android:layout_toLeftOf="@id/button_reload_tile"
android:layout_toRightOf="@+id/mapillary_filters_tile_cache_icon"
android:layout_toStartOf="@id/button_reload_tile"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="12dp"
android:paddingTop="10dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mapillary_menu_title_tile_cache"
android:textAppearance="@style/TextAppearance.ListItemTitle" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/mapillary_menu_descr_tile_cache"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
</RelativeLayout>
<LinearLayout xmlns:osmand="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:minHeight="64dp"
android:orientation="vertical">
<include layout="@layout/card_bottom_divider" />
<View
android:layout_width="match_parent"
android:layout_height="6dp" />
<include layout="@layout/card_top_divider" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?attr/bg_color"
android:gravity="center"
android:minHeight="48dp"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<net.osmand.plus.widgets.TextViewEx
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:text="@string/search_poi_filter"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_sub_text_size"
osmand:typeface="@string/font_roboto_medium" />
<net.osmand.plus.widgets.TextViewEx
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="4dp"
android:text="@string/mapillary_menu_filter_description"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/mapillary_filters_user_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
tools:src="@drawable/ic_action_user" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="12dp"
android:paddingTop="10dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mapillary_menu_title_username"
android:textAppearance="@style/TextAppearance.ListItemTitle" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:lines="1"
android:text="@string/mapillary_menu_descr_username"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="?attr/bg_color"
android:orientation="vertical"
android:paddingLeft="52dp"
android:paddingStart="52dp">
<net.osmand.plus.views.controls.DelayAutoCompleteTextView
android:id="@+id/auto_complete_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:completionThreshold="1"
android:hint="@string/mapillary_menu_edit_text_hint"
android:inputType="text"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
tools:text="Username" />
<LinearLayout
android:id="@+id/warning_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/warning_image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:text="@string/wrong_user_name"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size"
tools:text="Wrong user name!" />
</LinearLayout>
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_marginTop="12dp"
android:background="?attr/dashboard_divider" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/mapillary_filters_date_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
tools:src="@drawable/ic_action_data" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="12dp"
android:paddingTop="10dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mapillary_menu_title_dates"
android:textAppearance="@style/TextAppearance.ListItemTitle" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:lines="1"
android:text="@string/mapillary_menu_descr_dates"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical"
android:paddingLeft="52dp"
android:paddingStart="52dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp">
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1">
<EditText
android:id="@+id/date_from_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:hint="@string/mapillary_menu_date_from"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
tools:text="From" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_weight="1">
<EditText
android:id="@+id/date_to_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:hint="@string/shared_string_to"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
tools:text="To" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_marginTop="16dp"
android:background="?attr/dashboard_divider" />
</LinearLayout>
android:scaleType="fitXY"
android:src="@drawable/bg_shadow_onmap" />
<LinearLayout
android:id="@+id/mapillary_filters_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/toggle_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color">
android:background="?attr/bg_color"
android:minHeight="60dp"
tools:layout_height="60dp">
<Button
android:id="@+id/button_clear"
<android.support.v7.widget.AppCompatImageView
android:id="@+id/toggle_row_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="56dp"
android:layout_marginStart="56dp"
android:background="?attr/selectableItemBackground"
android:gravity="start|center_vertical"
android:minWidth="0dp"
android:text="@string/shared_string_reset"
android:textAlignment="textStart"
android:textColor="?attr/color_dialog_buttons" />
android:layout_centerVertical="true"
android:layout_margin="16dp"
tools:src="@drawable/ic_action_gabout_dark" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/toggle_row_toggle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:focusable="false" />
<android.support.v7.widget.AppCompatTextView
android:id="@+id/toggle_row_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/toggle_row_icon"
android:layout_toLeftOf="@id/toggle_row_toggle"
android:layout_toRightOf="@+id/toggle_row_icon"
android:layout_toStartOf="@id/toggle_row_toggle"
android:textAppearance="@style/TextAppearance.ListItemTitle"
tools:text="Some title text" />
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_marginTop="12dp"
android:layout_toEndOf="@+id/toggle_row_icon"
android:layout_toRightOf="@+id/toggle_row_icon"
android:background="?attr/dashboard_divider" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/mapillary_filters_tile_cache_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_margin="16dp"
tools:src="@drawable/ic_layer_top_dark" />
<Button
android:id="@+id/button_apply"
android:id="@+id/button_reload_tile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:background="?attr/selectableItemBackground"
android:gravity="end|center_vertical"
android:minWidth="0dp"
android:text="@string/shared_string_apply"
android:text="@string/shared_string_reload"
android:textAlignment="textEnd"
android:textColor="?attr/color_dialog_buttons" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_toEndOf="@+id/mapillary_filters_tile_cache_icon"
android:layout_toLeftOf="@id/button_reload_tile"
android:layout_toRightOf="@+id/mapillary_filters_tile_cache_icon"
android:layout_toStartOf="@id/button_reload_tile"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="12dp"
android:paddingTop="10dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mapillary_menu_title_tile_cache"
android:textAppearance="@style/TextAppearance.ListItemTitle" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/mapillary_menu_descr_tile_cache"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
</RelativeLayout>
<include layout="@layout/card_bottom_divider" />
<View
<LinearLayout xmlns:osmand="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="18dp" />
android:layout_height="wrap_content"
android:clickable="false"
android:minHeight="64dp"
android:orientation="vertical">
<include layout="@layout/card_bottom_divider" />
<View
android:layout_width="match_parent"
android:layout_height="6dp" />
<include layout="@layout/card_top_divider" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?attr/bg_color"
android:gravity="center"
android:minHeight="48dp"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<net.osmand.plus.widgets.TextViewEx
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:text="@string/search_poi_filter"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_sub_text_size"
osmand:typeface="@string/font_roboto_medium" />
<net.osmand.plus.widgets.TextViewEx
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="4dp"
android:text="@string/mapillary_menu_filter_description"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/mapillary_filters_user_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
tools:src="@drawable/ic_action_user" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="12dp"
android:paddingTop="10dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mapillary_menu_title_username"
android:textAppearance="@style/TextAppearance.ListItemTitle" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:lines="1"
android:text="@string/mapillary_menu_descr_username"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="?attr/bg_color"
android:orientation="vertical"
android:paddingLeft="52dp"
android:paddingStart="52dp">
<net.osmand.plus.views.controls.DelayAutoCompleteTextView
android:id="@+id/auto_complete_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:completionThreshold="1"
android:hint="@string/mapillary_menu_edit_text_hint"
android:inputType="text"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
tools:text="Username" />
<LinearLayout
android:id="@+id/warning_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/warning_image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:text="@string/wrong_user_name"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size"
tools:text="Wrong user name!" />
</LinearLayout>
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_marginTop="12dp"
android:background="?attr/dashboard_divider" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:minHeight="60dp">
<android.support.v7.widget.AppCompatImageView
android:id="@+id/mapillary_filters_date_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
tools:src="@drawable/ic_action_data" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:minHeight="60dp"
android:orientation="vertical"
android:paddingBottom="12dp"
android:paddingTop="10dp">
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mapillary_menu_title_dates"
android:textAppearance="@style/TextAppearance.ListItemTitle" />
<android.support.v7.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:lines="1"
android:text="@string/mapillary_menu_descr_dates"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical"
android:paddingLeft="52dp"
android:paddingStart="52dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp">
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginRight="12dp"
android:layout_weight="1">
<EditText
android:id="@+id/date_from_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:hint="@string/mapillary_menu_date_from"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
tools:text="From" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_weight="1">
<EditText
android:id="@+id/date_to_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:hint="@string/shared_string_to"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
tools:text="To" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<View
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_marginTop="16dp"
android:background="?attr/dashboard_divider" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color">
<Button
android:id="@+id/button_clear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="56dp"
android:layout_marginStart="56dp"
android:background="?attr/selectableItemBackground"
android:gravity="start|center_vertical"
android:minWidth="0dp"
android:text="@string/shared_string_reset"
android:textAlignment="textStart"
android:textColor="?attr/color_dialog_buttons" />
<Button
android:id="@+id/button_apply"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:background="?attr/selectableItemBackground"
android:gravity="end|center_vertical"
android:minWidth="0dp"
android:text="@string/shared_string_apply"
android:textAlignment="textEnd"
android:textColor="?attr/color_dialog_buttons" />
</RelativeLayout>
<include layout="@layout/card_bottom_divider" />
<View
android:layout_width="match_parent"
android:layout_height="18dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -1,6 +0,0 @@
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/shadow_on_map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@drawable/bg_shadow_onmap" />

View file

@ -77,7 +77,6 @@ import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu;
import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu.LocalRoutingParameter;
import net.osmand.plus.mapillary.MapillaryFiltersFragment;
import net.osmand.plus.mapillary.MapillaryFiltersMapShadowFragment;
import net.osmand.plus.mapillary.MapillaryPlugin.MapillaryFirstDialogFragment;
import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin;
import net.osmand.plus.routing.RoutingHelper;
@ -824,8 +823,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
addOrUpdateDashboardFragments();
} else {
mapActivity.getSupportFragmentManager().beginTransaction()
.replace(R.id.content, new MapillaryFiltersMapShadowFragment(), MapillaryFiltersMapShadowFragment.TAG)
.add(R.id.content, new MapillaryFiltersFragment(), MapillaryFiltersFragment.TAG)
.replace(R.id.content, new MapillaryFiltersFragment(), MapillaryFiltersFragment.TAG)
.commit();
}
scrollView.setVisibility(View.VISIBLE);
@ -1253,13 +1251,11 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
private void removeMapillaryFiltersFragment() {
FragmentManager manager = mapActivity.getSupportFragmentManager();
Fragment mapillaryFragment = manager.findFragmentByTag(MapillaryFiltersFragment.TAG);
Fragment shadowOnMap = manager.findFragmentByTag(MapillaryFiltersMapShadowFragment.TAG);
if (mapillaryFragment != null && shadowOnMap != null) {
if (mapillaryFragment != null) {
OsmandSettings settings = getMyApplication().getSettings();
TransactionBuilder builder = new TransactionBuilder(manager, settings, mapActivity);
builder.getFragmentTransaction()
.remove(mapillaryFragment)
.remove(shadowOnMap)
.commit();
}
}

View file

@ -60,7 +60,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
final DateFormat dateFormat = SimpleDateFormat.getDateInstance(DateFormat.MEDIUM);
final View view = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.fragment_mapillary_filters, null);
view.setBackgroundColor(backgroundColor);
view.findViewById(R.id.mapillary_filters_linear_layout).setBackgroundColor(backgroundColor);
final View toggleRow = view.findViewById(R.id.toggle_row);
@ -78,7 +78,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
((AppCompatTextView) toggleRow.findViewById(R.id.toggle_row_title)).setText(toggleActionStringId);
final Drawable drawable = getIcon(toggleIconId, toggleIconColorId);
((AppCompatImageView) toggleRow.findViewById(R.id.toggle_row_icon)).setImageDrawable(drawable);
final CompoundButton toggle = (CompoundButton) toggleRow.findViewById(R.id.toggle_row_toggle);
final CompoundButton toggle = toggleRow.findViewById(R.id.toggle_row_toggle);
toggle.setChecked(selected);
toggle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
@ -96,7 +96,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
});
final Button reloadTile = (Button) view.findViewById(R.id.button_reload_tile);
final Button reloadTile = view.findViewById(R.id.button_reload_tile);
reloadTile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -114,7 +114,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
((AppCompatImageView) view.findViewById(R.id.mapillary_filters_tile_cache_icon)).setImageDrawable(getIcon(R.drawable.ic_layer_top_dark, colorRes));
final DelayAutoCompleteTextView textView = (DelayAutoCompleteTextView) view.findViewById(R.id.auto_complete_text_view);
final DelayAutoCompleteTextView textView = view.findViewById(R.id.auto_complete_text_view);
textView.setAdapter(new MapillaryAutoCompleteAdapter(getContext(), R.layout.auto_complete_suggestion, getMyApplication()));
String selectedUsername = settings.MAPILLARY_FILTER_USERNAME.get();
if (!selectedUsername.equals("") && settings.USE_MAPILLARY_FILTER.get()) {
@ -162,12 +162,12 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
}
});
ImageView imageView = (ImageView) view.findViewById(R.id.warning_image_view);
ImageView imageView = view.findViewById(R.id.warning_image_view);
imageView.setImageDrawable(getPaintedContentIcon(R.drawable.ic_small_warning,
getResources().getColor(R.color.color_warning)));
final EditText dateFromEt = (EditText) view.findViewById(R.id.date_from_edit_text);
final EditText dateFromEt = view.findViewById(R.id.date_from_edit_text);
final DatePickerDialog.OnDateSetListener dateFromDialog = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker v, int year, int monthOfYear, int dayOfMonth) {
@ -194,7 +194,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
dateFromEt.setCompoundDrawablesWithIntrinsicBounds(null, null, getContentIcon(R.drawable.ic_action_arrow_drop_down), null);
final EditText dateToEt = (EditText) view.findViewById(R.id.date_to_edit_text);
final EditText dateToEt = view.findViewById(R.id.date_to_edit_text);
final DatePickerDialog.OnDateSetListener dateToDialog = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker v, int year, int monthOfYear, int dayOfMonth) {
@ -232,7 +232,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
}
final Button apply = (Button) view.findViewById(R.id.button_apply);
final Button apply = view.findViewById(R.id.button_apply);
changeButtonState(apply, .5f, false);
apply.setOnClickListener(new View.OnClickListener() {
@Override
@ -263,7 +263,7 @@ public class MapillaryFiltersFragment extends BaseOsmAndFragment {
});
final Button clear = (Button) view.findViewById(R.id.button_clear);
final Button clear = view.findViewById(R.id.button_clear);
clear.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

View file

@ -1,24 +0,0 @@
package net.osmand.plus.mapillary;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.osmand.plus.R;
public class MapillaryFiltersMapShadowFragment extends Fragment {
public static final String TAG = "MAPILLARY_FILTERS_MAP_SHADOW_FRAGMENT";
public MapillaryFiltersMapShadowFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.shadow_on_map, null);
}
}