From f2dd32483744526af64ab7d9e1d65ad5b08f0c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B0=D1=86=D0=B5=D0=BF=D0=B8=D0=BD?= Date: Fri, 27 Sep 2019 20:27:03 +0300 Subject: [android] Migrated code to Android X --- .../mapswithme/maps/maplayer/BottomSheetItem.java | 6 +++--- .../maps/maplayer/MapLayerCompositeController.java | 4 ++-- android/src/com/mapswithme/maps/maplayer/Mode.java | 2 +- .../maps/maplayer/ToggleMapLayerDialog.java | 24 ++++++++++------------ .../subway/OnTransitSchemeChangedListener.java | 4 ++-- .../maps/maplayer/subway/SubwayManager.java | 2 +- .../maplayer/subway/SubwayMapLayerController.java | 2 +- .../maps/maplayer/subway/TransitSchemeState.java | 2 +- .../maps/maplayer/traffic/TrafficManager.java | 4 ++-- .../maps/maplayer/traffic/TrafficState.java | 4 ++-- .../maplayer/traffic/widget/TrafficButton.java | 2 +- .../traffic/widget/TrafficButtonController.java | 4 ++-- 12 files changed, 29 insertions(+), 31 deletions(-) (limited to 'android/src/com/mapswithme/maps/maplayer') diff --git a/android/src/com/mapswithme/maps/maplayer/BottomSheetItem.java b/android/src/com/mapswithme/maps/maplayer/BottomSheetItem.java index ccbfb67c70..5398cb1ec6 100644 --- a/android/src/com/mapswithme/maps/maplayer/BottomSheetItem.java +++ b/android/src/com/mapswithme/maps/maplayer/BottomSheetItem.java @@ -1,9 +1,9 @@ package com.mapswithme.maps.maplayer; import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; import com.mapswithme.maps.R; import com.mapswithme.util.ThemeUtils; diff --git a/android/src/com/mapswithme/maps/maplayer/MapLayerCompositeController.java b/android/src/com/mapswithme/maps/maplayer/MapLayerCompositeController.java index 5e0a51d99b..b359fe8fbf 100644 --- a/android/src/com/mapswithme/maps/maplayer/MapLayerCompositeController.java +++ b/android/src/com/mapswithme/maps/maplayer/MapLayerCompositeController.java @@ -1,8 +1,8 @@ package com.mapswithme.maps.maplayer; import android.app.Activity; -import android.support.annotation.NonNull; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; import android.view.View; import com.mapswithme.maps.maplayer.subway.SubwayMapLayerController; diff --git a/android/src/com/mapswithme/maps/maplayer/Mode.java b/android/src/com/mapswithme/maps/maplayer/Mode.java index e0db7b281c..349919b2eb 100644 --- a/android/src/com/mapswithme/maps/maplayer/Mode.java +++ b/android/src/com/mapswithme/maps/maplayer/Mode.java @@ -1,7 +1,7 @@ package com.mapswithme.maps.maplayer; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.mapswithme.maps.maplayer.subway.SubwayManager; import com.mapswithme.maps.maplayer.traffic.TrafficManager; diff --git a/android/src/com/mapswithme/maps/maplayer/ToggleMapLayerDialog.java b/android/src/com/mapswithme/maps/maplayer/ToggleMapLayerDialog.java index 7a489fcb95..7f8676468e 100644 --- a/android/src/com/mapswithme/maps/maplayer/ToggleMapLayerDialog.java +++ b/android/src/com/mapswithme/maps/maplayer/ToggleMapLayerDialog.java @@ -4,17 +4,16 @@ import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.BottomSheetBehavior; -import android.support.design.widget.BottomSheetDialog; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.bottomsheet.BottomSheetBehavior; +import com.google.android.material.bottomsheet.BottomSheetDialog; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.appcompat.app.AppCompatActivity; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; @@ -26,7 +25,6 @@ import com.mapswithme.maps.R; import com.mapswithme.maps.adapter.OnItemClickListener; import com.mapswithme.maps.maplayer.subway.OnSubwayLayerToggleListener; import com.mapswithme.maps.maplayer.traffic.OnTrafficLayerToggleListener; -import com.mapswithme.maps.metrics.UserActionsLogger; import com.mapswithme.maps.widget.recycler.SpanningLinearLayoutManager; import java.util.Arrays; @@ -55,7 +53,7 @@ public class ToggleMapLayerDialog extends DialogFragment private void onShow(@NonNull DialogInterface dialogInterface) { BottomSheetDialog dialog = (BottomSheetDialog) dialogInterface; - View bottomSheet = dialog.findViewById(android.support.design.R.id.design_bottom_sheet); + View bottomSheet = dialog.findViewById(com.google.android.material.R.id.design_bottom_sheet); BottomSheetBehavior behavior = BottomSheetBehavior.from(Objects.requireNonNull(bottomSheet)); behavior.setState(BottomSheetBehavior.STATE_EXPANDED); } diff --git a/android/src/com/mapswithme/maps/maplayer/subway/OnTransitSchemeChangedListener.java b/android/src/com/mapswithme/maps/maplayer/subway/OnTransitSchemeChangedListener.java index 71cda22edf..4b51994761 100644 --- a/android/src/com/mapswithme/maps/maplayer/subway/OnTransitSchemeChangedListener.java +++ b/android/src/com/mapswithme/maps/maplayer/subway/OnTransitSchemeChangedListener.java @@ -2,8 +2,8 @@ package com.mapswithme.maps.maplayer.subway; import android.app.Application; import android.content.Context; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; import com.mapswithme.maps.content.AbstractContextualListener; diff --git a/android/src/com/mapswithme/maps/maplayer/subway/SubwayManager.java b/android/src/com/mapswithme/maps/maplayer/subway/SubwayManager.java index fc320644ef..40f8aa31d6 100644 --- a/android/src/com/mapswithme/maps/maplayer/subway/SubwayManager.java +++ b/android/src/com/mapswithme/maps/maplayer/subway/SubwayManager.java @@ -2,7 +2,7 @@ package com.mapswithme.maps.maplayer.subway; import android.app.Application; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.mapswithme.maps.Framework; import com.mapswithme.maps.MwmApplication; diff --git a/android/src/com/mapswithme/maps/maplayer/subway/SubwayMapLayerController.java b/android/src/com/mapswithme/maps/maplayer/subway/SubwayMapLayerController.java index d2e38b17c4..150fb77571 100644 --- a/android/src/com/mapswithme/maps/maplayer/subway/SubwayMapLayerController.java +++ b/android/src/com/mapswithme/maps/maplayer/subway/SubwayMapLayerController.java @@ -1,6 +1,6 @@ package com.mapswithme.maps.maplayer.subway; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.View; import android.view.ViewGroup; diff --git a/android/src/com/mapswithme/maps/maplayer/subway/TransitSchemeState.java b/android/src/com/mapswithme/maps/maplayer/subway/TransitSchemeState.java index 5b85891ce1..367e6b705c 100644 --- a/android/src/com/mapswithme/maps/maplayer/subway/TransitSchemeState.java +++ b/android/src/com/mapswithme/maps/maplayer/subway/TransitSchemeState.java @@ -1,7 +1,7 @@ package com.mapswithme.maps.maplayer.subway; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.widget.Toast; import com.mapswithme.maps.R; diff --git a/android/src/com/mapswithme/maps/maplayer/traffic/TrafficManager.java b/android/src/com/mapswithme/maps/maplayer/traffic/TrafficManager.java index fd0de9ed79..7b43a332b2 100644 --- a/android/src/com/mapswithme/maps/maplayer/traffic/TrafficManager.java +++ b/android/src/com/mapswithme/maps/maplayer/traffic/TrafficManager.java @@ -1,7 +1,7 @@ package com.mapswithme.maps.maplayer.traffic; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; import com.mapswithme.util.log.Logger; import com.mapswithme.util.log.LoggerFactory; diff --git a/android/src/com/mapswithme/maps/maplayer/traffic/TrafficState.java b/android/src/com/mapswithme/maps/maplayer/traffic/TrafficState.java index 52458121b9..69b4be9589 100644 --- a/android/src/com/mapswithme/maps/maplayer/traffic/TrafficState.java +++ b/android/src/com/mapswithme/maps/maplayer/traffic/TrafficState.java @@ -1,7 +1,7 @@ package com.mapswithme.maps.maplayer.traffic; -import android.support.annotation.MainThread; -import android.support.annotation.NonNull; +import androidx.annotation.MainThread; +import androidx.annotation.NonNull; import com.mapswithme.util.statistics.Statistics; diff --git a/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButton.java b/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButton.java index f704bb02c7..4b98ed2b27 100644 --- a/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButton.java +++ b/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButton.java @@ -4,7 +4,7 @@ import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.AnimationDrawable; import android.graphics.drawable.Drawable; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.view.View; import android.widget.ImageButton; import android.widget.RelativeLayout; diff --git a/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButtonController.java b/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButtonController.java index e032ab5b74..c8ca5cf53a 100644 --- a/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButtonController.java +++ b/android/src/com/mapswithme/maps/maplayer/traffic/widget/TrafficButtonController.java @@ -4,8 +4,8 @@ import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.widget.Toast; import com.mapswithme.maps.R; -- cgit v1.2.3