[android] Cleaned up old legacy pre-api21 checks. Removed some unused layouts and classes.

Signed-off-by: Dzmitry Yarmolenka <dzmitry.yarmolenka.1986@gmail.com>
This commit is contained in:
Dzmitry Yarmolenka 2021-08-02 18:20:39 +02:00 committed by Roman Tsisyk
parent 811f519b1c
commit 04422bef3f
41 changed files with 85 additions and 533 deletions

View file

@ -18,8 +18,7 @@
<TextView
android:id="@+id/tv__title"
style="@style/MwmWidget.StackedButtonsDialogTitle"
tools:text="Use mobile internet to show detailed information?"
tools:targetApi="jelly_bean"/>
tools:text="Use mobile internet to show detailed information?"/>
<TextView
android:id="@+id/tv__message"
@ -30,8 +29,7 @@
<TextView
android:id="@+id/btn__positive"
style="@style/MwmWidget.Button.StackedButtonsDialog"
tools:text="Use Always"
tools:targetApi="jelly_bean"/>
tools:text="Use Always"/>
<LinearLayout
android:orientation="horizontal"
@ -42,14 +40,12 @@
style="@style/MwmWidget.Button.StackedButtonsDialog"
android:layout_weight="1"
android:gravity="start|center_vertical"
tools:text="Only Today"
tools:targetApi="jelly_bean"/>
tools:text="Only Today"/>
<TextView
android:id="@+id/btn__negative"
style="@style/MwmWidget.Button.StackedButtonsDialog"
android:layout_weight="1"
tools:text="Do not Use Today"
tools:targetApi="jelly_bean"/>
tools:text="Do not Use Today"/>
</LinearLayout>
</LinearLayout>

View file

@ -22,6 +22,5 @@
android:textColor="?colorAccent"
android:visibility="gone"
tools:text="43 m"
tools:targetApi="jelly_bean"
tools:visibility="visible"/>
</LinearLayout>

View file

@ -33,6 +33,5 @@
android:textColor="?colorAccent"
android:visibility="gone"
tools:text="43 m"
tools:targetApi="jelly_bean"
tools:visibility="visible"/>
</RelativeLayout>

View file

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:background="?bgBoughtContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_half_plus_eight"
android:orientation="horizontal">
<TextView
android:id="@+id/text"
android:padding="@dimen/margin_quarter_plus"
android:background="?selectableItemBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:fontFamily="@string/robotoRegular"
android:lines="1"
android:ellipsize="end"
android:textColor="?colorAccent"
android:textSize="@dimen/text_size_body_3"
android:text="@string/hide"
android:textAllCaps="true"
tools:text="HIDE" />
</RelativeLayout>

View file

@ -18,8 +18,7 @@
<TextView
android:id="@+id/tv__title"
style="@style/MwmWidget.StackedButtonsDialogTitle"
tools:text="Use mobile internet to show detailed information?"
tools:targetApi="jelly_bean"/>
tools:text="Use mobile internet to show detailed information?"/>
<TextView
android:id="@+id/tv__message"
@ -30,18 +29,15 @@
<TextView
android:id="@+id/btn__positive"
style="@style/MwmWidget.Button.StackedButtonsDialog"
tools:text="Use Always"
tools:targetApi="jelly_bean"/>
tools:text="Use Always"/>
<TextView
android:id="@+id/btn__neutral"
style="@style/MwmWidget.Button.StackedButtonsDialog"
tools:text="Only Today"
tools:targetApi="jelly_bean"/>
tools:text="Only Today"/>
<TextView
android:id="@+id/btn__negative"
style="@style/MwmWidget.Button.StackedButtonsDialog"
tools:text="Do not Use Today"
tools:targetApi="jelly_bean"/>
tools:text="Do not Use Today"/>
</LinearLayout>

View file

@ -103,8 +103,7 @@
android:fontFamily="@string/robotoMedium"
android:text="@string/openstreetmap"
android:textAllCaps="false"
android:textAppearance="@style/MwmTextAppearance.Body1.Light"
tools:targetApi="jelly_bean"/>
android:textAppearance="@style/MwmTextAppearance.Body1.Light"/>
<TextView
android:layout_width="wrap_content"

View file

@ -41,8 +41,7 @@
android:fontFamily="@string/robotoMedium"
android:text="@string/openstreetmap"
android:textAllCaps="false"
android:textAppearance="@style/MwmTextAppearance.Body1.Light"
tools:targetApi="jelly_bean"/>
android:textAppearance="@style/MwmTextAppearance.Body1.Light"/>
<Button
android:id="@+id/register"
@ -55,8 +54,7 @@
android:padding="@dimen/margin_quarter"
android:text="@string/register_at_openstreetmap"
android:textAppearance="@style/MwmTextAppearance.Body1"
android:textColor="@color/text_dark"
tools:targetApi="jelly_bean"/>
android:textColor="@color/text_dark"/>
</LinearLayout>

View file

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:minWidth="@dimen/dialog_min_width"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="@dimen/margin_base"
android:background="?cardBackground">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/title"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="start"
android:layout_gravity="center_vertical"
android:textSize="@dimen/text_size_body_0"
android:lineSpacingExtra="@dimen/line_spacing_extra_2"
android:fontFamily="@string/robotoRegular"
android:textStyle="bold"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_width="0dp"
tools:ignore="UnusedAttribute"
tools:text="Woohoo!"
android:layout_marginEnd="@dimen/margin_base"/>
<ImageView
android:id="@+id/image"
android:layout_gravity="center_vertical"
android:layout_width="@dimen/primary_button_min_height"
android:layout_height="@dimen/primary_button_min_height"
android:src="@drawable/ic_error_36px"/>
</LinearLayout>
<TextView
android:id="@+id/description"
android:textAppearance="?android:attr/textAppearance"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_body_3"
android:fontFamily="@string/robotoRegular"
android:textStyle="normal"
android:textColor="?android:textColorSecondary"
android:lineSpacingExtra="@dimen/line_spacing_extra_2"
android:gravity="center|start"
android:layout_marginTop="@dimen/margin_half"
tools:text="Now, you can add to your map detailed descriptiom of the best places"
tools:ignore="UnusedAttribute"/>
<include
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_base_plus"
layout="@layout/accept_decline_button_container">
</include>
</LinearLayout>

View file

@ -25,8 +25,7 @@
android:layout_gravity="center_vertical"
android:layout_marginTop="@dimen/margin_half_double_plus"
android:paddingEnd="@dimen/margin_base"
android:paddingStart="@dimen/margin_base"
tools:targetApi="jelly_bean"/>
android:paddingStart="@dimen/margin_base"/>
<LinearLayout
android:layout_marginTop="@dimen/margin_half_double_plus"
android:orientation="horizontal"
@ -42,8 +41,7 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="?android:attr/textColorPrimary"
tools:targetApi="jelly_bean"/>
android:textColor="?android:attr/textColorPrimary"/>
<Switch
android:id="@+id/avoid_tolls_btn"
android:layout_width="wrap_content"
@ -64,8 +62,7 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="?android:attr/textColorPrimary"
tools:targetApi="jelly_bean"/>
android:textColor="?android:attr/textColorPrimary"/>
<Switch
android:id="@+id/avoid_dirty_roads_btn"
android:layout_width="wrap_content"
@ -86,8 +83,7 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="?android:attr/textColorPrimary"
tools:targetApi="jelly_bean"/>
android:textColor="?android:attr/textColorPrimary"/>
<Switch
android:id="@+id/avoid_ferries_btn"
android:layout_width="wrap_content"
@ -108,8 +104,7 @@
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary"
tools:targetApi="jelly_bean"/>
android:textColor="?android:attr/textColorPrimary"/>
<Switch
android:id="@+id/avoid_motorways_btn"
android:layout_width="wrap_content"

View file

@ -65,8 +65,7 @@
android:layout_width="@dimen/editor_auth_btn_height"
android:layout_height="@dimen/editor_auth_btn_height"
android:layout_gravity="center"
android:elevation="@dimen/design_fab_elevation"
tools:targetApi="lollipop" />
android:elevation="@dimen/design_fab_elevation"/>
</FrameLayout>
<TextView
android:id="@+id/lost_password"

View file

@ -17,8 +17,7 @@
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:elevation="@dimen/dp_0"
app:elevation="@dimen/dp_0"
tools:targetApi="lollipop">
app:elevation="@dimen/dp_0">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar_with_search_no_elevation"

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:paddingStart="@dimen/margin_double"
android:paddingEnd="@dimen/margin_double"
@ -17,6 +16,5 @@
android:fontFamily="@string/robotoMedium"
android:textStyle="normal"
android:letterSpacing="0.04"
android:textAppearance="@style/MwmTextAppearance.Button"
tools:targetApi="lollipop"/>
android:textAppearance="@style/MwmTextAppearance.Button"/>
</FrameLayout>

View file

@ -26,6 +26,5 @@
android:text="@string/bookmarks_create_new_group"
android:textAllCaps="true"
android:textAppearance="@style/MwmTextAppearance.Body3"
android:textColor="?colorAccent"
tools:targetApi="jelly_bean" />
android:textColor="?colorAccent"/>
</LinearLayout>

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -26,6 +25,5 @@
android:text="@string/bookmarks_import"
android:textAllCaps="true"
android:textAppearance="@style/MwmTextAppearance.Body3"
android:textColor="?colorAccent"
tools:targetApi="jelly_bean" />
android:textColor="?colorAccent"/>
</LinearLayout>

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/placepage_facilities_item"
android:orientation="horizontal"
android:gravity="center_vertical"
android:background="?clickableBackground"
android:clickable="true"
tools:visibility="visible">
<!-- <ImageView
android:id="@+id/iv__icon"
style="@style/PlacePageMetadataIcon"
android:src="@drawable/ic_entrance"/>-->
<TextView
android:id="@+id/tv__facility"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Body3.Primary"
android:maxLines="2"
android:ellipsize="end"
tools:text="Pets are allowed on request"/>
</LinearLayout>

View file

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?cardBackground">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="@dimen/margin_base"
android:paddingBottom="@dimen/margin_base"
android:paddingTop="@dimen/margin_base"
android:paddingEnd="@dimen/margin_base">
<TextView
android:id="@+id/guide_title"
style="?textAppearanceHeadline5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?actionMenuTextColor"
tools:text="@string/bookmarks" />
<TextView
android:id="@+id/btn_description"
style="?fontSubtitle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_half_plus"
android:text="@string/description"
android:layout_marginBottom="@dimen/margin_half"
android:textAllCaps="true"
android:textColor="?colorAccent" />
</LinearLayout>
</merge>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/gallery_image_height"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground">
<ImageView
android:id="@+id/iv__image"
android:layout_width="match_parent"
android:layout_height="@dimen/gallery_image_height"
tools:src="@color/base_green"/>
</FrameLayout>

View file

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:paddingTop="@dimen/margin_half_plus"
android:paddingBottom="@dimen/margin_half_plus"
android:paddingEnd="@dimen/margin_base"
android:paddingStart="@dimen/margin_base"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground"
tools:background="#4000FFFF">
<ImageView
android:id="@+id/iv__icon"
android:layout_width="@dimen/placepage_hotel_nearby_icon_size"
android:layout_height="@dimen/placepage_hotel_nearby_icon_size"
android:layout_centerVertical="true"
tools:src="@color/base_green"/>
<LinearLayout
android:id="@+id/ll__info"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_double"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/iv__icon"
android:gravity="center_vertical">
<TextView
android:id="@+id/tv__title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textAppearance="@style/MwmTextAppearance.Body1"
tools:text="Bowery"/>
<TextView
android:id="@+id/tv__type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_quarter"
android:maxLines="1"
android:textAppearance="@style/MwmTextAppearance.Body3"
tools:text="Subway Station"/>
</LinearLayout>
<TextView
android:id="@+id/tv__distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/ll__info"
android:maxLines="1"
android:textAppearance="@style/MwmTextAppearance.PlacePage.Accent"
android:gravity="end"
tools:text="800 ft"/>
</RelativeLayout>

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/gallery_product_width"
android:layout_height="wrap_content"
android:orientation="vertical"
android:minHeight="@dimen/discovery_search_item_min_height"
android:padding="@dimen/margin_quarter"
android:gravity="center"
android:clipToPadding="false"
android:foreground="?clickableBackground">
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="?attr/sponsoredGalleryMore"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_half_plus"
android:textAppearance="@style/MwmTextAppearance.Body2"
android:fontFamily="@string/robotoMedium"
android:textColor="?colorAccent"
android:textAllCaps="true"
tools:text="More"
tools:targetApi="jelly_bean"/>
</LinearLayout>

View file

@ -18,7 +18,6 @@
android:layout_alignParentEnd="true"
android:visibility="gone"
tools:text="43 m"
tools:targetApi="jelly_bean"
tools:visibility="visible"/>
<TextView
android:id="@+id/time"

View file

@ -23,8 +23,7 @@
android:background="?clickableBackground"
android:fontFamily="@string/robotoMedium"
android:textSize="@dimen/text_size_caption"
android:text="@string/search_show_on_map"
tools:targetApi="jelly_bean"/>
android:text="@string/search_show_on_map"/>
<include
android:id="@+id/divider"
layout="@layout/divider_horizontal"

View file

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/product_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.RoutingDetail"
tools:text="UberX"/>
<TextView
android:id="@+id/arrival_time_price"
android:layout_marginTop="@dimen/margin_quarter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/MwmTextAppearance.Body3"
android:maxLines="2"
tools:text="Ожидание 10 мин • 350-400 \u20BD"/>
</LinearLayout>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
app:showAsAction="always"
android:id="@+id/done"
android:title="@string/done"
android:icon="@drawable/ic_done"/>
</menu>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/share"
android:title="@string/share"
android:icon="@drawable/ic_share"/>
</menu>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<style name="PlacePageButtonText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:textAllCaps" tools:targetApi="ice_cream_sandwich">true</item>
<item name="android:textAllCaps">true</item>
<item name="android:textSize">10sp</item>
</style>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<style name="MwmTextAppearance" parent="TextAppearance.AppCompat">
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoRegular</item>
<item name="android:fontFamily">@string/robotoRegular</item>
<!-- Force normal textStyle. Some devices (eg Lenovo P70), uses non-normal textStyle by default. -->
<item name="android:textStyle">normal</item>
</style>
@ -18,7 +18,7 @@
<style name="MwmTextAppearance.Title.Toolbar">
<item name="android:textSize">@dimen/text_size_toolbar</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
</style>
<style name="MwmTextAppearance.Headline">
@ -144,7 +144,7 @@
<style name="MwmTextAppearance.RoutingDetail">
<item name="android:textSize">@dimen/text_size_routing_plan_detail</item>
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
@ -154,13 +154,13 @@
<style name="MwmTextAppearance.NavStreet">
<item name="android:textSize">@dimen/text_size_nav_street</item>
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="MwmTextAppearance.NavNextTurn">
<item name="android:textSize">@dimen/text_size_nav_next_turn</item>
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">?android:textColorPrimaryInverse</item>
</style>
@ -190,7 +190,7 @@
</style>
<style name="MwmTextAppearance.Discovery.Subtitle" parent="MwmTextAppearance.Body3">
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:gravity">start</item>
</style>
@ -209,11 +209,11 @@
</style>
<style name="MwmTextAppearance.BookingFilter.Title" parent="MwmTextAppearance.Body3">
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
</style>
<style name="MwmTextAppearance.BookingFilter.Warning" parent="MwmTextAppearance.Body3">
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoRegular</item>
<item name="android:fontFamily">@string/robotoRegular</item>
<item name="android:textColor">@color/dark_gray</item>
</style>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="MwmWidget"/>
@ -32,10 +31,10 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">?buttonBackground</item>
<item name="android:stateListAnimator" tools:targetApi="lollipop">@null</item>
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoMedium</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:textAllCaps">true</item>
<item name="android:letterSpacing" tools:ignore="NewApi">0.04</item>
<item name="android:letterSpacing">0.04</item>
</style>
<style name="MwmWidget.Button.Accent">
@ -51,7 +50,7 @@
<item name="android:textSize">@dimen/text_size_button</item>
<item name="android:textColor">?buttonDialogTextColor</item>
<item name="android:textAllCaps">true</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:lines">1</item>
<item name="android:gravity">center_vertical|end</item>
</style>
@ -61,7 +60,7 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">@dimen/margin_dialog_title</item>
<item name="android:textAppearance">@style/MwmTextAppearance.Body1</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
</style>
<style name="MwmWidget.StackedButtonsDialogMessage">
@ -89,7 +88,7 @@
<item name="android:minHeight">@dimen/primary_button_min_height</item>
<item name="android:textColor">?colorAccent</item>
<item name="android:textSize">@dimen/text_size_body_3</item>
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="textAllCaps">true</item>
</style>
@ -113,7 +112,7 @@
</style>
<style name="MwmWidget.Floating">
<item name="android:elevation" tools:ignore="NewApi">@dimen/appbar_elevation</item>
<item name="android:elevation">@dimen/appbar_elevation</item>
</style>
<style name="MwmWidget.Floating.Panel">
@ -125,7 +124,7 @@
<item name="android:textAppearance">@style/MwmTextAppearance.PlacePage</item>
<item name="android:textColorHint">?secondary</item>
<item name="android:textCursorDrawable">@null</item>
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoRegular</item>
<item name="android:fontFamily">@string/robotoRegular</item>
</style>
<style name="MwmWidget.PopupMenu" parent="Widget.AppCompat.PopupMenu.Overflow">
@ -134,21 +133,21 @@
<style name="MwmWidget.ToolbarStyle" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:background">?colorPrimary</item>
<item name="android:elevation" tools:ignore="NewApi">@dimen/appbar_elevation</item>
<item name="android:elevation">@dimen/appbar_elevation</item>
<item name="android:displayOptions">homeAsUp|showTitle</item>
<item name="contentInsetStart">72dp</item>
<item name="android:titleTextAppearance" tools:ignore="NewApi">@style/MwmTextAppearance.Toolbar.Title</item>
<item name="android:titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title</item>
<item name="titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title</item>
<item name="android:contentInsetStart">72dp</item>
</style>
<style name="MwmWidget.ToolbarStyle.Light">
<item name="android:titleTextAppearance" tools:targetApi="lollipop">@style/MwmTextAppearance.Toolbar.Title.Light</item>
<item name="android:titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title.Light</item>
<item name="titleTextAppearance">@style/MwmTextAppearance.Toolbar.Title.Light</item>
</style>
<style name="MwmWidget.ToolbarStyle.NoElevation">
<item name="android:elevation" tools:ignore="NewApi">0dp</item>
<item name="android:elevation">0dp</item>
</style>
<style name="MwmWidget.ToolbarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">

View file

@ -7,19 +7,19 @@
<item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
<item name="android:listViewStyle">@style/MwmWidget.ListView</item>
<item name="android:textViewStyle">@style/MwmWidget.TextView</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:forceDarkAllowed" tools:targetApi="Q">false</item>
<item name="android:textColorPrimary">@color/text_dark</item>
<item name="android:textColorPrimaryInverse">@color/text_light</item>
<item name="android:textColorSecondary">@color/text_dark_subtitle</item>
<item name="android:windowBackground">?windowBackgroundForced</item>
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@color/bg_statusbar</item>
<item name="android:colorPrimaryDark">@color/bg_statusbar</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoRegular</item>
<item name="android:fontFamily">@string/robotoRegular</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="clickableBackground">?selectableItemBackground</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="alertDialogTheme">@style/MwmTheme.AlertDialog</item>
<item name="windowBackgroundForced">@color/bg_window</item>
<item name="cardFrame">@drawable/card_frame</item>
@ -183,19 +183,19 @@
<item name="materialCalendarTheme">@style/MwmWidget.MaterialCalendar.Theme.Dark</item>
<item name="android:listViewStyle">@style/MwmWidget.ListView</item>
<item name="android:textViewStyle">@style/MwmWidget.TextView</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:forceDarkAllowed" tools:targetApi="Q">false</item>
<item name="android:textColorPrimary">@color/text_light</item>
<item name="android:textColorPrimaryInverse">@color/text_dark</item>
<item name="android:textColorSecondary">@color/text_light_subtitle</item>
<item name="android:windowBackground">?windowBackgroundForced</item>
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">?statusBar</item>
<item name="android:colorPrimaryDark">?statusBar</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoRegular</item>
<item name="android:fontFamily">@string/robotoRegular</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="clickableBackground">?selectableItemBackground</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="alertDialogTheme">@style/MwmTheme.Night.AlertDialog</item>
<item name="windowBackgroundForced">@color/bg_window_night</item>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<style name="MwmTheme" parent="MwmTheme.Base"/>
<style name="MwmTheme.Night" parent="MwmTheme.Night.Base"/>
@ -14,12 +14,12 @@
</style>
<style name="MwmTheme.MainActivity">
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@android:color/black</item>
<item name="android:colorPrimaryDark">@android:color/black</item>
<item name="android:windowBackground">@null</item>
</style>
<style name="MwmTheme.Night.MainActivity">
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@android:color/black</item>
<item name="android:colorPrimaryDark">@android:color/black</item>
<item name="android:windowBackground">@null</item>
</style>
@ -57,7 +57,7 @@
<style name="MwmTheme.DialogTitleBase">
<item name="android:textSize">@dimen/text_size_alert_dialog_title</item>
<item name="android:fontFamily" tools:ignore="NewApi">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
</style>
<style name="MwmTheme.DialogTitleStyle.Light" parent="MwmTheme.DialogTitleBase">
@ -79,12 +79,12 @@
<style name="MwmTheme.DialogFragment.TitleStyle" parent="Base.DialogWindowTitle.AppCompat">
<item name="android:textAppearance">@style/MwmTextAppearance.Title</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
</style>
<style name="MwmTheme.DialogFragment.Fullscreen" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/bg_primary</item>
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">?statusBar</item>
<item name="android:colorPrimaryDark">?statusBar</item>
<item name="colorAccent">@color/base_accent</item>
<item name="clickableBackground">?selectableItemBackground</item>
<item name="colorControlNormal">@color/text_light_hint</item>
@ -92,19 +92,19 @@
<item name="android:textColorHint">@color/text_dark_hint</item>
<item name="android:textViewStyle">@style/MwmWidget.TextView</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoRegular</item>
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:fontFamily">@string/robotoRegular</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
<style name="MwmTheme.DialogFragment.NoFullscreen" parent="MwmTheme.DialogFragment.Fullscreen">
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">false</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@color/bg_dialog_translucent</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:statusBarColor">@color/bg_dialog_translucent</item>
</style>
<style name="MwmTheme.DialogFragment.Fullscreen.Night" parent="Theme.AppCompat">
<item name="colorPrimary">@color/bg_primary_night</item>
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">?statusBar</item>
<item name="android:colorPrimaryDark">?statusBar</item>
<item name="colorAccent">@color/base_accent_night</item>
<item name="clickableBackground">?selectableItemBackground</item>
<item name="colorControlNormal">@color/text_dark_hint</item>
@ -112,32 +112,32 @@
<item name="android:textColorHint">@color/text_light_hint</item>
<item name="android:textViewStyle">@style/MwmWidget.TextView</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoRegular</item>
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
<item name="android:fontFamily">@string/robotoRegular</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
<style name="MwmTheme.DialogFragment.NoFullscreen.Night" parent="MwmTheme.DialogFragment.Fullscreen.Night">
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">false</item>
<item name="android:statusBarColor" tools:targetApi="lollipop">@color/bg_dialog_translucent</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:statusBarColor">@color/bg_dialog_translucent</item>
</style>
<style name="MwmTheme.DialogFragment.Fullscreen.Translucent">
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@android:color/black</item>
<item name="android:colorPrimaryDark">@android:color/black</item>
<item name="android:windowBackground">@color/bg_dialog_translucent</item>
<item name="android:windowIsTranslucent">true</item>
</style>
<style name="MwmMain.DialogFragment.TimePicker" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorAccent">@color/base_accent</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:windowBackground">@color/bg_cards</item>
<item name="android:background">@color/bg_cards</item>
</style>
<style name="MwmMain.DialogFragment.TimePicker.Night" parent="Theme.AppCompat.Dialog.Alert">
<item name="colorAccent">@color/base_accent_night</item>
<item name="android:fontFamily" tools:targetApi="jelly_bean">@string/robotoMedium</item>
<item name="android:fontFamily">@string/robotoMedium</item>
<item name="android:windowBackground">@color/bg_cards_night</item>
<item name="android:background">@color/bg_cards_night</item>
</style>
@ -193,13 +193,13 @@
<style name="MwmTheme.FullScreenGalleryActivity">
<item name="colorPrimary">@android:color/transparent</item>
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@android:color/black</item>
<item name="android:colorPrimaryDark">@android:color/black</item>
<item name="android:windowBackground">@null</item>
</style>
<style name="MwmTheme.Night.FullScreenGalleryActivity">
<item name="colorPrimary">@android:color/transparent</item>
<item name="android:colorPrimaryDark" tools:targetApi="lollipop">@android:color/black</item>
<item name="android:colorPrimaryDark">@android:color/black</item>
<item name="android:windowBackground">@null</item>
</style>

View file

@ -420,7 +420,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
}
mIsTabletLayout = getResources().getBoolean(R.bool.tabletLayout);
if (!mIsTabletLayout && (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP))
if (!mIsTabletLayout)
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
setContentView(R.layout.activity_map);

View file

@ -1,13 +0,0 @@
package com.mapswithme.maps.dialog;
import androidx.annotation.NonNull;
public class ConfirmationDialogFactory implements DialogFactory
{
@NonNull
@Override
public AlertDialog createDialog()
{
return new DefaultConfirmationAlertDialog();
}
}

View file

@ -1,12 +0,0 @@
package com.mapswithme.maps.dialog;
import com.mapswithme.maps.R;
public class DefaultConfirmationAlertDialog extends AlertDialog
{
@Override
protected int getLayoutId()
{
return R.layout.fragment_confirmation;
}
}

View file

@ -8,7 +8,6 @@ import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.TextPaint;
import android.text.TextUtils;
import android.util.AttributeSet;
@ -19,7 +18,6 @@ import androidx.annotation.Dimension;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.core.graphics.drawable.DrawableCompat;
import com.mapswithme.maps.R;
@ -63,7 +61,6 @@ public class TransitStepView extends View implements MultilineLayoutManager.Sque
init(attrs);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public TransitStepView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes)
{
super(context, attrs, defStyleAttr, defStyleRes);

View file

@ -23,7 +23,6 @@ import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@ -1894,11 +1893,7 @@ public class NestedScrollViewClickFixed extends FrameLayout implements NestedScr
int height = getHeight();
int xTranslation = 0;
int yTranslation = Math.min(0, scrollY);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP || getClipToPadding()) {
width -= getPaddingLeft() + getPaddingRight();
xTranslation += getPaddingLeft();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && getClipToPadding()) {
if (getClipToPadding()) {
height -= getPaddingTop() + getPaddingBottom();
yTranslation += getPaddingTop();
}
@ -1915,11 +1910,8 @@ public class NestedScrollViewClickFixed extends FrameLayout implements NestedScr
int height = getHeight();
int xTranslation = 0;
int yTranslation = Math.max(getScrollRange(), scrollY) + height;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP || getClipToPadding()) {
width -= getPaddingLeft() + getPaddingRight();
xTranslation += getPaddingLeft();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && getClipToPadding()) {
if (getClipToPadding()) {
height -= getPaddingTop() + getPaddingBottom();
yTranslation -= getPaddingBottom();
}

View file

@ -1,10 +1,8 @@
package com.mapswithme.maps.widget;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
@ -61,7 +59,6 @@ public class PlaceholderView extends LinearLayout
init(context, attrs);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public PlaceholderView(Context context, @Nullable AttributeSet attrs, int defStyleAttr,
int defStyleRes)
{

View file

@ -1,11 +1,11 @@
package com.mapswithme.maps.widget;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.AppCompatRadioButton;
import com.mapswithme.maps.R;
@ -86,10 +86,7 @@ public class RoutingToolbarButton extends AppCompatRadioButton
public void setButtonTintList(@ColorRes int color)
{
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
setSupportButtonTintList(getResources().getColorStateList(color));
else
setButtonTintList(getResources().getColorStateList(color));
setButtonTintList(AppCompatResources.getColorStateList(getContext(), color));
}
public void setIcon(@DrawableRes int icon)

View file

@ -4,7 +4,6 @@ package com.mapswithme.maps.widget.placepage;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.os.Build;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
@ -13,7 +12,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.github.mikephil.charting.charts.Chart;
import com.github.mikephil.charting.components.IMarker;
@ -72,7 +70,6 @@ public class FloatingMarkerView extends RelativeLayout implements IMarker
LayoutInflater.from(getContext()).inflate(R.layout.floating_marker_view, this, true);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public FloatingMarkerView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
{
super(context, attrs, defStyleAttr, defStyleRes);

View file

@ -343,8 +343,7 @@ public class PlacePageView extends NestedScrollViewClickFixed
mDownloaderInfo = mPreview.findViewById(R.id.tv__downloader_details);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
setElevation(UiUtils.dimen(getContext(), R.dimen.placepage_elevation));
setElevation(UiUtils.dimen(getContext(), R.dimen.placepage_elevation));
if (UiUtils.isLandscape(getContext()))
setBackgroundResource(0);

View file

@ -1,76 +0,0 @@
package com.mapswithme.util;
import androidx.annotation.NonNull;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
class PreLollipopSSLSocketFactory extends SSLSocketFactory
{
@NonNull
private final SSLSocketFactory mSslSocketFactory;
PreLollipopSSLSocketFactory(@NonNull SSLSocketFactory sslSocketFactory)
{
super();
this.mSslSocketFactory = sslSocketFactory;
}
@Override
public String[] getDefaultCipherSuites()
{
return mSslSocketFactory.getDefaultCipherSuites();
}
@Override
public String[] getSupportedCipherSuites()
{
return mSslSocketFactory.getSupportedCipherSuites();
}
@Override
public SSLSocket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
{
SSLSocket socket = (SSLSocket) mSslSocketFactory.createSocket(s, host, port, autoClose);
socket.setEnabledProtocols(new String[] { "TLSv1.2" });
return socket;
}
@Override
public Socket createSocket(String host, int port) throws IOException
{
SSLSocket socket = (SSLSocket) mSslSocketFactory.createSocket(host, port);
socket.setEnabledProtocols(new String[] { "TLSv1.2" });
return socket;
}
@Override
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
{
SSLSocket socket = (SSLSocket) mSslSocketFactory.createSocket(host, port, localHost, localPort);
socket.setEnabledProtocols(new String[] { "TLSv1.2" });
return socket;
}
@Override
public Socket createSocket(InetAddress host, int port) throws IOException
{
SSLSocket socket = (SSLSocket) mSslSocketFactory.createSocket(host, port);
socket.setEnabledProtocols(new String[] { "TLSv1.2" });
return socket;
}
@Override
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
throws IOException
{
SSLSocket socket = (SSLSocket) mSslSocketFactory.createSocket(address, port, localAddress, localPort);
socket.setEnabledProtocols(new String[] { "TLSv1.2" });
return socket;
}
}

View file

@ -10,7 +10,6 @@ import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.text.Html;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
@ -413,15 +412,7 @@ public final class UiUtils
public static void setupStatusBar(@NonNull Activity activity)
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
{
activity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
else
{
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
View statusBarTintView = new View(activity);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, getStatusBarHeight(activity));

View file

@ -201,10 +201,7 @@ public class Utils
{
final Intent marketIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
else
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
try
{