Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Yunitsky <yunik@mapswithme.com>2015-09-07 18:03:34 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:04:00 +0300
commitb4af92f82c6c281c82a1bccbc6a7d6afb6c837a4 (patch)
treeb9c35e1a693b7cdc7e6ae0662033919278054577 /android
parent0d0a6e663fc994ce92bcc32d4ae3c32659a29412 (diff)
[android] Updated libs, removed old code.
Diffstat (limited to 'android')
-rw-r--r--android/3rd_party/BottomSheet/build.gradle2
-rw-r--r--android/3rd_party/Parse-1.9.2.jarbin936883 -> 0 bytes
-rw-r--r--android/3rd_party/ParseCrashReporting-1.9.2.jarbin77775 -> 0 bytes
-rw-r--r--android/3rd_party/ParseFacebookUtilsV4-1.9.2.jarbin8475 -> 0 bytes
-rw-r--r--android/3rd_party/httpmime-4.1.2.jarbin26890 -> 0 bytes
-rw-r--r--android/UnitTests/build.gradle2
-rw-r--r--android/build.gradle15
-rw-r--r--android/gradle.properties2
-rw-r--r--android/res/values/dimens.xml3
-rw-r--r--android/src/com/mapswithme/country/BaseDownloadAdapter.java199
-rw-r--r--android/src/com/mapswithme/maps/PanelAnimator.java13
-rw-r--r--android/src/com/mapswithme/maps/ads/RateStoreDialogFragment.java6
-rw-r--r--android/src/com/mapswithme/maps/downloader/DownloadChunkTask.java5
-rw-r--r--android/src/com/mapswithme/maps/location/AndroidNativeProvider.java9
-rw-r--r--android/src/com/mapswithme/maps/routing/RoutingInfo.java7
-rw-r--r--android/src/com/mapswithme/maps/settings/StoragePathManager.java9
-rw-r--r--android/src/com/mapswithme/maps/widget/BottomButtonsLayout.java0
-rw-r--r--android/src/com/mapswithme/maps/widget/FadeView.java11
-rw-r--r--android/src/com/mapswithme/maps/widget/placepage/BasePlacePageAnimationController.java2
-rw-r--r--android/src/com/mapswithme/maps/widget/placepage/PlacePageBottomAnimationController.java96
-rw-r--r--android/src/com/mapswithme/maps/widget/placepage/PlacePageLeftAnimationController.java28
-rw-r--r--android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java21
-rw-r--r--android/src/com/mapswithme/util/UiUtils.java13
-rw-r--r--android/src/com/nvidia/devtech/NvEventQueueFragment.java5
24 files changed, 175 insertions, 273 deletions
diff --git a/android/3rd_party/BottomSheet/build.gradle b/android/3rd_party/BottomSheet/build.gradle
index 777c623dad..a9d52502c0 100644
--- a/android/3rd_party/BottomSheet/build.gradle
+++ b/android/3rd_party/BottomSheet/build.gradle
@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
+ classpath 'com.android.tools.build:gradle:1.3.1'
}
}
diff --git a/android/3rd_party/Parse-1.9.2.jar b/android/3rd_party/Parse-1.9.2.jar
deleted file mode 100644
index 8a49bf431e..0000000000
--- a/android/3rd_party/Parse-1.9.2.jar
+++ /dev/null
Binary files differ
diff --git a/android/3rd_party/ParseCrashReporting-1.9.2.jar b/android/3rd_party/ParseCrashReporting-1.9.2.jar
deleted file mode 100644
index c9739a93fc..0000000000
--- a/android/3rd_party/ParseCrashReporting-1.9.2.jar
+++ /dev/null
Binary files differ
diff --git a/android/3rd_party/ParseFacebookUtilsV4-1.9.2.jar b/android/3rd_party/ParseFacebookUtilsV4-1.9.2.jar
deleted file mode 100644
index 993858b946..0000000000
--- a/android/3rd_party/ParseFacebookUtilsV4-1.9.2.jar
+++ /dev/null
Binary files differ
diff --git a/android/3rd_party/httpmime-4.1.2.jar b/android/3rd_party/httpmime-4.1.2.jar
deleted file mode 100644
index eea3b3ff17..0000000000
--- a/android/3rd_party/httpmime-4.1.2.jar
+++ /dev/null
Binary files differ
diff --git a/android/UnitTests/build.gradle b/android/UnitTests/build.gradle
index c7d09e5619..1a894d109a 100644
--- a/android/UnitTests/build.gradle
+++ b/android/UnitTests/build.gradle
@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.1.+'
+ classpath 'com.android.tools.build:gradle:1.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/android/build.gradle b/android/build.gradle
index 7359179f79..f10f596de0 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -4,7 +4,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
+ classpath 'com.android.tools.build:gradle:1.3.1'
}
}
@@ -23,14 +23,13 @@ dependencies {
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
// google play services
- compile 'com.google.android.gms:play-services-location:7.5.0'
- compile 'com.google.android.gms:play-services-analytics:7.5.0'
- compile 'com.google.android.gms:play-services-plus:7.5.0'
+ compile 'com.google.android.gms:play-services-location:7.8.0'
+ compile 'com.google.android.gms:play-services-analytics:7.8.0'
+ compile 'com.google.android.gms:play-services-plus:7.8.0'
// 3-party
- compile 'com.nineoldandroids:library:2.4.0'
- compile 'com.facebook.android:facebook-android-sdk:4.4.0'
- // for Parse SDK
- compile 'com.parse.bolts:bolts-android:1.1.2'
+ compile 'com.facebook.android:facebook-android-sdk:4.5.0'
+ compile 'com.parse.bolts:bolts-android:1.2.1'
+ compile 'com.parse:parse-android:1.10.1'
compile fileTree(dir: '3rd_party', include: '*.jar')
// BottomSheet
compile project(":3rd_party:BottomSheet")
diff --git a/android/gradle.properties b/android/gradle.properties
index c2d9cbfab3..2123e66a18 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,4 +1,6 @@
propMinSdkVersion=15
+# TODO use 23 target and build tools version, when ProGuard problem will be fixed
+# https://code.google.com/p/android/issues/detail?id=184567
propTargetSdkVersion=22
propBuildToolsVersion=22.0.1
propVersionCode=503
diff --git a/android/res/values/dimens.xml b/android/res/values/dimens.xml
index a496013685..2ce7652d77 100644
--- a/android/res/values/dimens.xml
+++ b/android/res/values/dimens.xml
@@ -75,4 +75,7 @@
<dimen name="menu_line_button_width">64dp</dimen>
<dimen name="menu_line_button_width_edge">56dp</dimen>
<dimen name="menu_list_item_height">48dp</dimen>
+
+ <dimen name="navigation_elevation">4dp</dimen>
+ <dimen name="appbar_elevation">4dp</dimen>
</resources>
diff --git a/android/src/com/mapswithme/country/BaseDownloadAdapter.java b/android/src/com/mapswithme/country/BaseDownloadAdapter.java
index db31258393..050cfd3424 100644
--- a/android/src/com/mapswithme/country/BaseDownloadAdapter.java
+++ b/android/src/com/mapswithme/country/BaseDownloadAdapter.java
@@ -1,8 +1,10 @@
package com.mapswithme.country;
+import android.animation.Animator;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
import android.app.Dialog;
import android.content.DialogInterface;
-import android.os.Build;
import android.os.Handler;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
@@ -27,10 +29,6 @@ import com.mapswithme.util.StringUtils;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.Utils;
import com.mapswithme.util.statistics.Statistics;
-import com.nineoldandroids.animation.Animator;
-import com.nineoldandroids.animation.AnimatorSet;
-import com.nineoldandroids.animation.ObjectAnimator;
-import com.nineoldandroids.view.ViewHelper;
import java.lang.ref.WeakReference;
@@ -354,13 +352,11 @@ public abstract class BaseDownloadAdapter extends BaseAdapter
if (item == null)
return;
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
- {
- ViewHelper.setTranslationX(holder.mInfoSlided, 0);
- ViewHelper.setTranslationX(holder.mInfo, 0);
- ViewHelper.setTranslationX(holder.mProgress, 0);
- ViewHelper.setTranslationX(holder.mProgressSlided, 0);
- }
+ holder.mInfoSlided.setTranslationX(0);
+ holder.mInfo.setTranslationX(0);
+ holder.mProgress.setTranslationX(0);
+ holder.mProgressSlided.setTranslationX(0);
+
long[] sizes;
switch (item.getStatus())
{
@@ -497,40 +493,35 @@ public abstract class BaseDownloadAdapter extends BaseAdapter
setHolderPercentColor(holder, mFragment.getResources().getColor(R.color.downloader_gray));
holder.mProgress.setVisibility(View.VISIBLE);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
- {
- ObjectAnimator animator = ObjectAnimator.ofFloat(holder.mProgress, PROPERTY_TRANSLATION_X, 0,
- -mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
- animator.setDuration(ANIMATION_LENGTH);
-
- AnimatorSet animatorSet = new AnimatorSet();
- animatorSet.addListener(new UiUtils.SimpleNineoldAnimationListener()
- {
- @Override
- public void onAnimationEnd(Animator animation)
- {
- setDownloadingViewsVisible(holder, true);
- mActiveAnimationsCount--;
- }
- });
+ ObjectAnimator animator = ObjectAnimator.ofFloat(holder.mProgress, PROPERTY_TRANSLATION_X, 0,
+ -mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
+ animator.setDuration(ANIMATION_LENGTH);
- if (getItem(position).getStatus() == MapStorage.NOT_DOWNLOADED)
+ AnimatorSet animatorSet = new AnimatorSet();
+ animatorSet.addListener(new UiUtils.SimpleAnimatorListener()
+ {
+ @Override
+ public void onAnimationEnd(Animator animation)
{
- ObjectAnimator infoAnimator = ObjectAnimator.ofFloat(holder.mInfo, PROPERTY_TRANSLATION_X, 0,
- -mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
- infoAnimator.setDuration(ANIMATION_LENGTH);
-
- animatorSet.playTogether(animator, infoAnimator);
+ setDownloadingViewsVisible(holder, true);
+ mActiveAnimationsCount--;
}
- else
- animatorSet.play(animator);
+ });
- animatorSet.start();
- holder.animator = animatorSet;
- mActiveAnimationsCount++;
+ if (getItem(position).getStatus() == MapStorage.NOT_DOWNLOADED)
+ {
+ ObjectAnimator infoAnimator = ObjectAnimator.ofFloat(holder.mInfo, PROPERTY_TRANSLATION_X, 0,
+ -mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
+ infoAnimator.setDuration(ANIMATION_LENGTH);
+
+ animatorSet.playTogether(animator, infoAnimator);
}
else
- setDownloadingViewsVisible(holder, true);
+ animatorSet.play(animator);
+
+ animatorSet.start();
+ holder.animator = animatorSet;
+ mActiveAnimationsCount++;
downloadCountry(position, newOptions);
}
@@ -560,87 +551,77 @@ public abstract class BaseDownloadAdapter extends BaseAdapter
setHolderPercentText(holder, mFragment.getString(R.string.downloader_queued));
setHolderPercentColor(holder, mFragment.getResources().getColor(R.color.downloader_gray));
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
+ ObjectAnimator animator = ObjectAnimator.ofFloat(holder.mProgress, PROPERTY_TRANSLATION_X, 0,
+ -mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
+ animator.setDuration(ANIMATION_LENGTH);
+
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
+ {
+ @Override
+ public void onAnimationEnd(Animator animation)
+ {
+ setDownloadingViewsVisible(holder, true);
+ mActiveAnimationsCount--;
+ }
+ });
+
+ animator.start();
+ holder.animator = animator;
+ mActiveAnimationsCount++;
+
+ downloadCountry(position, options);
+ }
+
+ private void stopItemDownloading(final ViewHolder holder, final int position)
+ {
+ final CountryItem item = getItem(position);
+ mActiveAnimationsCount++;
+ if (item.getStatus() == MapStorage.NOT_DOWNLOADED)
{
- ObjectAnimator animator = ObjectAnimator.ofFloat(holder.mProgress, PROPERTY_TRANSLATION_X, 0,
- -mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
+ ObjectAnimator animator = ObjectAnimator.ofFloat(holder.mInfoSlided, PROPERTY_TRANSLATION_X, 0,
+ mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
animator.setDuration(ANIMATION_LENGTH);
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ ObjectAnimator infoAnimator = ObjectAnimator.ofFloat(holder.mProgressSlided, PROPERTY_TRANSLATION_X, 0,
+ mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
+ infoAnimator.setDuration(ANIMATION_LENGTH);
+
+ AnimatorSet animatorSet = new AnimatorSet();
+ animatorSet.playTogether(animator, infoAnimator);
+ animatorSet.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
{
- setDownloadingViewsVisible(holder, true);
+ setDownloadingViewsVisible(holder, false);
mActiveAnimationsCount--;
}
});
-
- animator.start();
- holder.animator = animator;
- mActiveAnimationsCount++;
+ animatorSet.start();
+ holder.animator = animatorSet;
}
else
- setDownloadingViewsVisible(holder, true);
-
- downloadCountry(position, options);
- }
-
- private void stopItemDownloading(final ViewHolder holder, final int position)
- {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
{
- final CountryItem item = getItem(position);
- mActiveAnimationsCount++;
- if (item.getStatus() == MapStorage.NOT_DOWNLOADED)
- {
- ObjectAnimator animator = ObjectAnimator.ofFloat(holder.mInfoSlided, PROPERTY_TRANSLATION_X, 0,
- mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
- animator.setDuration(ANIMATION_LENGTH);
+ holder.mImageRoutingStatus.setVisibility(View.VISIBLE);
+ bindCarRoutingIcon(holder, item);
- ObjectAnimator infoAnimator = ObjectAnimator.ofFloat(holder.mProgressSlided, PROPERTY_TRANSLATION_X, 0,
- mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
- infoAnimator.setDuration(ANIMATION_LENGTH);
+ ObjectAnimator infoAnimator = ObjectAnimator.ofFloat(holder.mProgressSlided, PROPERTY_TRANSLATION_X, 0,
+ mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
+ infoAnimator.setDuration(ANIMATION_LENGTH);
- AnimatorSet animatorSet = new AnimatorSet();
- animatorSet.playTogether(animator, infoAnimator);
- animatorSet.addListener(new UiUtils.SimpleNineoldAnimationListener()
- {
- @Override
- public void onAnimationEnd(Animator animation)
- {
- setDownloadingViewsVisible(holder, false);
- mActiveAnimationsCount--;
- }
- });
- animatorSet.start();
- holder.animator = animatorSet;
- }
- else
+ infoAnimator.addListener(new UiUtils.SimpleAnimatorListener()
{
- holder.mImageRoutingStatus.setVisibility(View.VISIBLE);
- bindCarRoutingIcon(holder, item);
-
- ObjectAnimator infoAnimator = ObjectAnimator.ofFloat(holder.mProgressSlided, PROPERTY_TRANSLATION_X, 0,
- mFragment.getResources().getDimensionPixelOffset(R.dimen.progress_wheel_width));
- infoAnimator.setDuration(ANIMATION_LENGTH);
-
- infoAnimator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ @Override
+ public void onAnimationEnd(Animator animation)
{
- @Override
- public void onAnimationEnd(Animator animation)
- {
- setDownloadingViewsVisible(holder, false);
- mActiveAnimationsCount--;
- }
- });
- infoAnimator.start();
- // invalidation is needed for 'update all/cancel all' buttons
- holder.animator = infoAnimator;
- }
+ setDownloadingViewsVisible(holder, false);
+ mActiveAnimationsCount--;
+ }
+ });
+ infoAnimator.start();
+ // invalidation is needed for 'update all/cancel all' buttons
+ holder.animator = infoAnimator;
}
- else
- setDownloadingViewsVisible(holder, false);
mHandler.postDelayed(mDatasetChangedRunnable, ANIMATION_LENGTH);
cancelDownload(position); // cancel download before checking real item status(now its just DOWNLOADING or IN_QUEUE)
@@ -811,17 +792,17 @@ public abstract class BaseDownloadAdapter extends BaseAdapter
case StorageOptions.MAP_OPTION_MAP_ONLY:
BottomSheetHelper.sheet(bs, MENU_UPDATE_MAP_DOWNLOAD_ROUTING, R.drawable.ic_download_routing,
mFragment.getString(R.string.downloader_download_routing) + ", " +
- StringUtils.getFileSizeString(remoteSizes[1]));
+ StringUtils.getFileSizeString(remoteSizes[1]));
BottomSheetHelper.sheet(bs, MENU_UPDATE, R.drawable.ic_update,
mFragment.getString(R.string.downloader_update_map) + ", " +
- StringUtils.getFileSizeString(remoteSizes[0]));
+ StringUtils.getFileSizeString(remoteSizes[0]));
break;
case StorageOptions.MAP_OPTION_MAP_AND_CAR_ROUTING:
BottomSheetHelper.sheet(bs, MENU_UPDATE_MAP_AND_ROUTING, R.drawable.ic_update,
mFragment.getString(R.string.downloader_update_map) + ", " +
- StringUtils.getFileSizeString(remoteSizes[1]));
+ StringUtils.getFileSizeString(remoteSizes[1]));
break;
}
}
@@ -829,7 +810,7 @@ public abstract class BaseDownloadAdapter extends BaseAdapter
if (status == MapStorage.ON_DISK && options == StorageOptions.MAP_OPTION_MAP_ONLY)
BottomSheetHelper.sheet(bs, MENU_DOWNLOAD_ROUTING, R.drawable.ic_download_routing,
mFragment.getString(R.string.downloader_download_routing) + ", " +
- StringUtils.getFileSizeString(remoteSizes[1] - remoteSizes[0]));
+ StringUtils.getFileSizeString(remoteSizes[1] - remoteSizes[0]));
if (status == MapStorage.ON_DISK || status == MapStorage.ON_DISK_OUT_OF_DATE)
{
@@ -851,11 +832,11 @@ public abstract class BaseDownloadAdapter extends BaseAdapter
case MapStorage.NOT_DOWNLOADED:
BottomSheetHelper.sheet(bs, MENU_DOWNLOAD_MAP_AND_ROUTING, R.drawable.ic_download_map,
mFragment.getString(R.string.downloader_download_map) + ", " +
- StringUtils.getFileSizeString(remoteSizes[1]));
+ StringUtils.getFileSizeString(remoteSizes[1]));
BottomSheetHelper.sheet(bs, MENU_DOWNLOAD, R.drawable.ic_no_routing,
mFragment.getString(R.string.downloader_download_map_no_routing) + ", " +
- StringUtils.getFileSizeString(remoteSizes[0]));
+ StringUtils.getFileSizeString(remoteSizes[0]));
break;
case MapStorage.DOWNLOAD_FAILED:
diff --git a/android/src/com/mapswithme/maps/PanelAnimator.java b/android/src/com/mapswithme/maps/PanelAnimator.java
index f80f78ceb1..c3c63c8594 100644
--- a/android/src/com/mapswithme/maps/PanelAnimator.java
+++ b/android/src/com/mapswithme/maps/PanelAnimator.java
@@ -1,5 +1,7 @@
package com.mapswithme.maps;
+import android.animation.Animator;
+import android.animation.ValueAnimator;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -8,9 +10,6 @@ import android.view.View;
import android.view.animation.AccelerateInterpolator;
import com.mapswithme.util.UiUtils;
-import com.nineoldandroids.animation.Animator;
-import com.nineoldandroids.animation.ValueAnimator;
-import com.nineoldandroids.view.ViewHelper;
class PanelAnimator
{
@@ -32,8 +31,8 @@ class PanelAnimator
private void track(ValueAnimator animation)
{
float offset = (Float) animation.getAnimatedValue();
- ViewHelper.setTranslationX(mPanel, offset);
- ViewHelper.setAlpha(mPanel, offset / WIDTH + 1.0f);
+ mPanel.setTranslationX(offset);
+ mPanel.setAlpha(offset / WIDTH + 1.0f);
mAnimationTrackListener.onTrackLeftAnimation(offset + WIDTH);
}
@@ -70,7 +69,7 @@ class PanelAnimator
track(animation);
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
@@ -105,7 +104,7 @@ class PanelAnimator
track(animation);
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
diff --git a/android/src/com/mapswithme/maps/ads/RateStoreDialogFragment.java b/android/src/com/mapswithme/maps/ads/RateStoreDialogFragment.java
index 78443fe498..8a475def0a 100644
--- a/android/src/com/mapswithme/maps/ads/RateStoreDialogFragment.java
+++ b/android/src/com/mapswithme/maps/ads/RateStoreDialogFragment.java
@@ -1,5 +1,7 @@
package com.mapswithme.maps.ads;
+import android.animation.Animator;
+import android.animation.ObjectAnimator;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
@@ -25,8 +27,6 @@ import com.mapswithme.util.UiUtils;
import com.mapswithme.util.Utils;
import com.mapswithme.util.statistics.AlohaHelper;
import com.mapswithme.util.statistics.Statistics;
-import com.nineoldandroids.animation.Animator;
-import com.nineoldandroids.animation.ObjectAnimator;
public class RateStoreDialogFragment extends BaseMwmDialogFragment implements View.OnClickListener
{
@@ -69,7 +69,7 @@ public class RateStoreDialogFragment extends BaseMwmDialogFragment implements Vi
else
{
ObjectAnimator animator = ObjectAnimator.ofFloat(rateBar, "alpha", 1.0f, 0.0f);
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
diff --git a/android/src/com/mapswithme/maps/downloader/DownloadChunkTask.java b/android/src/com/mapswithme/maps/downloader/DownloadChunkTask.java
index 555cdb576b..9a49932c5a 100644
--- a/android/src/com/mapswithme/maps/downloader/DownloadChunkTask.java
+++ b/android/src/com/mapswithme/maps/downloader/DownloadChunkTask.java
@@ -100,10 +100,7 @@ class DownloadChunkTask extends AsyncTask<Void, byte[], Boolean>
void start()
{
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
- executeOnExecutor(sExecutors, (Void[]) null);
- else
- execute((Void[]) null);
+ executeOnExecutor(sExecutors, (Void[]) null);
}
static long parseContentRange(String contentRangeValue)
diff --git a/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java b/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java
index fa655f95c4..93dc187c86 100644
--- a/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java
+++ b/android/src/com/mapswithme/maps/location/AndroidNativeProvider.java
@@ -4,11 +4,9 @@ package com.mapswithme.maps.location;
import android.content.Context;
import android.location.Location;
import android.location.LocationManager;
-import android.os.Build;
import android.os.Bundle;
import com.mapswithme.maps.MwmApplication;
-import com.mapswithme.util.ConnectionState;
import com.mapswithme.util.LocationUtils;
import java.util.ArrayList;
@@ -49,7 +47,7 @@ public class AndroidNativeProvider extends BaseLocationProvider implements andro
{
final Location lastLocation = LocationHelper.INSTANCE.getLastLocation();
if (lastLocation != null && !LocationUtils.isExpired(lastLocation, LocationHelper.INSTANCE.getLastLocationTime(),
- LocationUtils.LOCATION_EXPIRATION_TIME_MILLIS_SHORT))
+ LocationUtils.LOCATION_EXPIRATION_TIME_MILLIS_SHORT))
LocationHelper.INSTANCE.setLastLocation(lastLocation);
}
}
@@ -94,11 +92,6 @@ public class AndroidNativeProvider extends BaseLocationProvider implements andro
continue;
}
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB &&
- LocationManager.NETWORK_PROVIDER.equals(prov) &&
- !ConnectionState.isConnected())
- continue;
-
acceptedProviders.add(prov);
}
diff --git a/android/src/com/mapswithme/maps/routing/RoutingInfo.java b/android/src/com/mapswithme/maps/routing/RoutingInfo.java
index dff1142745..6dac13bb10 100644
--- a/android/src/com/mapswithme/maps/routing/RoutingInfo.java
+++ b/android/src/com/mapswithme/maps/routing/RoutingInfo.java
@@ -6,7 +6,6 @@ import android.widget.ImageView;
import com.mapswithme.maps.R;
import com.mapswithme.maps.bookmarks.data.DistanceAndAzimut;
-import com.nineoldandroids.view.ViewHelper;
public class RoutingInfo
{
@@ -67,8 +66,8 @@ public class RoutingInfo
public void setTurnDrawable(ImageView imageView)
{
imageView.setImageResource(mTurnRes);
- ViewHelper.setRotation(imageView, 0.0f);
- ViewHelper.setScaleX(imageView, isLeftTurn(this) ? -1 : 1); // right turns are displayed as mirrored left turns.
+ imageView.setRotation(0.0f);
+ imageView.setScaleX(isLeftTurn(this) ? -1 : 1); // right turns are displayed as mirrored left turns.
}
public static boolean isLeftTurn(VehicleTurnDirection turn)
@@ -94,7 +93,7 @@ public class RoutingInfo
public void setTurnDrawable(ImageView view, DistanceAndAzimut distanceAndAzimut)
{
view.setImageResource(R.drawable.ic_direction_pedestrian);
- ViewHelper.setRotation(view, (float) Math.toDegrees(distanceAndAzimut.getAzimuth()));
+ view.setRotation((float) Math.toDegrees(distanceAndAzimut.getAzimuth()));
}
}
diff --git a/android/src/com/mapswithme/maps/settings/StoragePathManager.java b/android/src/com/mapswithme/maps/settings/StoragePathManager.java
index d9895a5097..95ab98c6e1 100644
--- a/android/src/com/mapswithme/maps/settings/StoragePathManager.java
+++ b/android/src/com/mapswithme/maps/settings/StoragePathManager.java
@@ -822,19 +822,12 @@ public class StoragePathManager
}
}
- @SuppressWarnings("deprecation")
private static long getFreeBytesAtPath(String path)
{
long size = 0;
try
{
- if (Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.GINGERBREAD)
- {
- final StatFs stat = new StatFs(path);
- size = stat.getAvailableBlocks() * (long) stat.getBlockSize();
- }
- else
- size = new File(path).getFreeSpace();
+ size = new File(path).getFreeSpace();
} catch (RuntimeException e)
{
e.printStackTrace();
diff --git a/android/src/com/mapswithme/maps/widget/BottomButtonsLayout.java b/android/src/com/mapswithme/maps/widget/BottomButtonsLayout.java
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/android/src/com/mapswithme/maps/widget/BottomButtonsLayout.java
diff --git a/android/src/com/mapswithme/maps/widget/FadeView.java b/android/src/com/mapswithme/maps/widget/FadeView.java
index 19388e59f1..de35c4e40d 100644
--- a/android/src/com/mapswithme/maps/widget/FadeView.java
+++ b/android/src/com/mapswithme/maps/widget/FadeView.java
@@ -1,24 +1,25 @@
package com.mapswithme.maps.widget;
+import android.animation.Animator;
+import android.animation.ObjectAnimator;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.FrameLayout;
+
import com.mapswithme.maps.MwmApplication;
import com.mapswithme.maps.R;
import com.mapswithme.util.UiUtils;
-import com.nineoldandroids.animation.Animator;
-import com.nineoldandroids.animation.ObjectAnimator;
public class FadeView extends FrameLayout
{
private static final float FADE_ALPHA_VALUE = 0.4f;
private static final String PROPERTY_ALPHA = "alpha";
private static final int DURATION = MwmApplication.get().getResources().getInteger(R.integer.anim_fade_main);
-
- private final Animator.AnimatorListener mFadeOutListener = new UiUtils.SimpleNineoldAnimationListener()
+
+ private final Animator.AnimatorListener mFadeOutListener = new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
@@ -79,7 +80,7 @@ public class FadeView extends FrameLayout
public void fadeInInstantly()
{
UiUtils.show(this);
- ViewCompat.setAlpha(this, FADE_ALPHA_VALUE);
+ setAlpha(FADE_ALPHA_VALUE);
}
@Override
diff --git a/android/src/com/mapswithme/maps/widget/placepage/BasePlacePageAnimationController.java b/android/src/com/mapswithme/maps/widget/placepage/BasePlacePageAnimationController.java
index b3b172e306..fd093c4d7b 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/BasePlacePageAnimationController.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/BasePlacePageAnimationController.java
@@ -1,6 +1,5 @@
package com.mapswithme.maps.widget.placepage;
-import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v4.view.GestureDetectorCompat;
import android.view.MotionEvent;
@@ -21,7 +20,6 @@ import com.mapswithme.util.UiUtils;
public abstract class BasePlacePageAnimationController
{
protected static final int DURATION = MwmApplication.get().getResources().getInteger(R.integer.anim_placepage);
- protected static final boolean NO_ANIMATION = (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB);
protected State mState = State.HIDDEN;
diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageBottomAnimationController.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageBottomAnimationController.java
index c8e282d81e..bfe69fd137 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageBottomAnimationController.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageBottomAnimationController.java
@@ -1,8 +1,8 @@
package com.mapswithme.maps.widget.placepage;
+import android.animation.Animator;
+import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
-import android.annotation.TargetApi;
-import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v4.view.GestureDetectorCompat;
import android.support.v7.widget.Toolbar;
@@ -19,18 +19,13 @@ import com.mapswithme.maps.R;
import com.mapswithme.maps.widget.placepage.PlacePageView.State;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.concurrency.UiThread;
-import com.nineoldandroids.animation.Animator;
-import com.nineoldandroids.animation.ValueAnimator;
-import com.nineoldandroids.view.ViewHelper;
class PlacePageBottomAnimationController extends BasePlacePageAnimationController
{
private final ViewGroup mLayoutToolbar;
- private final AnimationHelper mAnimationHelper = (NO_ANIMATION ? null : new AnimationHelper());
+ private final AnimationHelper mAnimationHelper = new AnimationHelper();
-
- @TargetApi(Build.VERSION_CODES.HONEYCOMB)
private class AnimationHelper
{
final View.OnLayoutChangeListener mListener = new View.OnLayoutChangeListener()
@@ -40,7 +35,7 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
{
if (mState == State.BOOKMARK && v.getId() == mFrame.getId() && top != oldTop)
{
- ViewHelper.setTranslationY(mPreview, -mDetailsContent.getHeight());
+ mPreview.setTranslationY(-mDetailsContent.getHeight());
refreshToolbarVisibility();
}
}
@@ -81,8 +76,8 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
break;
case MotionEvent.ACTION_MOVE:
final float yDiff = mDownCoord - event.getY();
- if (mDownCoord < ViewHelper.getY(mPreview) || mDownCoord > ViewHelper.getY(mButtons) ||
- (mDownCoord > ViewHelper.getY(mFrame) && mDownCoord < ViewHelper.getY(mButtons) &&
+ if (mDownCoord < mPreview.getY() || mDownCoord > mButtons.getY() ||
+ (mDownCoord > mFrame.getY() && mDownCoord < mButtons.getY() &&
(mFrame.getHeight() != mDetailsContent.getHeight() && (mDetails.getScrollY() != 0 || yDiff > 0))))
return false;
if (Math.abs(yDiff) > mTouchSlop)
@@ -96,7 +91,7 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
@Override
protected boolean onTouchEvent(@NonNull MotionEvent event)
{
- if (mDownCoord < ViewHelper.getY(mPreview) || mDownCoord > ViewHelper.getY(mButtons))
+ if (mDownCoord < mPreview.getY() || mDownCoord > mButtons.getY())
return false;
super.onTouchEvent(event);
@@ -139,7 +134,7 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
@Override
public boolean onSingleTapConfirmed(MotionEvent e)
{
- if (mDownCoord < ViewHelper.getY(mPreview) && mDownCoord < ViewHelper.getY(mFrame))
+ if (mDownCoord < mPreview.getY() && mDownCoord < mFrame.getY())
return false;
if (mPlacePage.getState() == State.PREVIEW)
@@ -179,18 +174,6 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
if (mLayoutToolbar != null)
UiUtils.hide(mLayoutToolbar);
- if (NO_ANIMATION)
- {
- if (currentState == State.HIDDEN)
- ViewHelper.setTranslationY(mPreview, 0.0f);
- else
- UiUtils.invisible(mBookmarkDetails);
-
- UiUtils.invisible(mFrame);
- notifyVisibilityListener(true, false);
- return;
- }
-
mFrame.addOnLayoutChangeListener(mAnimationHelper.mListener);
ValueAnimator animator;
@@ -206,11 +189,11 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
- ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue());
- ViewHelper.setTranslationY(mButtons, (Float) animation.getAnimatedValue());
+ mPreview.setTranslationY((Float) animation.getAnimatedValue());
+ mButtons.setTranslationY((Float) animation.getAnimatedValue());
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
@@ -223,17 +206,17 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
{
final float detailsHeight = mFrame.getHeight();
interpolator = new AccelerateInterpolator();
- animator = ValueAnimator.ofFloat(ViewHelper.getTranslationY(mPreview), 0f);
+ animator = ValueAnimator.ofFloat(mPreview.getTranslationY(), 0f);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
- ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue());
- ViewHelper.setTranslationY(mFrame, (Float) animation.getAnimatedValue() + detailsHeight);
+ mPreview.setTranslationY((Float) animation.getAnimatedValue());
+ mFrame.setTranslationY((Float) animation.getAnimatedValue() + detailsHeight);
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
@@ -255,7 +238,7 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
@Override
public void run()
{
- ViewHelper.setTranslationY(mPreview, -mDetailsContent.getHeight());
+ mPreview.setTranslationY(-mDetailsContent.getHeight());
}
});
}
@@ -263,23 +246,12 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
private void showPreviewFrame()
{
UiUtils.show(mPlacePage, mPreview, mFrame);
- if (NO_ANIMATION)
- correctPreviewTranslation();
}
protected void showDetails(final State currentState)
{
showPreviewFrame();
- if (NO_ANIMATION)
- {
- refreshToolbarVisibility();
- notifyVisibilityListener(true, true);
- mDetails.scrollTo(0, 0);
- UiUtils.hide(mBookmarkDetails);
- return;
- }
-
final float detailsFullHeight = mDetailsContent.getHeight();
final float detailsScreenHeight = mDetails.getHeight();
final float bookmarkFullHeight = mBookmarkDetails.getHeight();
@@ -292,11 +264,11 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
- ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue() - detailsScreenHeight);
- ViewHelper.setTranslationY(mFrame, (Float) animation.getAnimatedValue());
+ mPreview.setTranslationY((Float) animation.getAnimatedValue() - detailsScreenHeight);
+ mFrame.setTranslationY((Float) animation.getAnimatedValue());
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
@@ -318,13 +290,6 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
UiUtils.show(mBookmarkDetails);
showPreviewFrame();
- if (NO_ANIMATION)
- {
- refreshToolbarVisibility();
- notifyVisibilityListener(true, true);
- return;
- }
-
final float detailsFullHeight = mDetailsContent.getHeight();
final float detailsScreenHeight = mDetails.getHeight();
final float bookmarkHeight = mBookmarkDetails.getHeight();
@@ -336,11 +301,11 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
- ViewHelper.setTranslationY(mPreview, (Float) animation.getAnimatedValue() - detailsScreenHeight);
- ViewHelper.setTranslationY(mFrame, (Float) animation.getAnimatedValue());
+ mPreview.setTranslationY((Float) animation.getAnimatedValue() - detailsScreenHeight);
+ mFrame.setTranslationY((Float) animation.getAnimatedValue());
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
@@ -363,7 +328,7 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
@Override
public void run()
{
- UiUtils.showIf(ViewHelper.getY(mPreview) < 0, mLayoutToolbar);
+ UiUtils.showIf(mPreview.getY() < 0, mLayoutToolbar);
}
});
}
@@ -374,32 +339,25 @@ class PlacePageBottomAnimationController extends BasePlacePageAnimationControlle
if (mLayoutToolbar != null)
UiUtils.hide(mLayoutToolbar);
- if (NO_ANIMATION)
- {
- UiUtils.hide(mPlacePage);
- notifyVisibilityListener(false, false);
- return;
- }
-
mFrame.removeOnLayoutChangeListener(mAnimationHelper.mListener);
- final float animHeight = mPlacePage.getHeight() - mPreview.getTop() - ViewHelper.getTranslationY(mPreview);
+ final float animHeight = mPlacePage.getHeight() - mPreview.getTop() - mPreview.getTranslationY();
final ValueAnimator animator = ValueAnimator.ofFloat(0f, animHeight);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{
@Override
public void onAnimationUpdate(ValueAnimator animation)
{
- ViewHelper.setTranslationY(mPlacePage, (Float) animation.getAnimatedValue());
+ mPlacePage.setTranslationY((Float) animation.getAnimatedValue());
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
{
UiUtils.invisible(mPlacePage, mBookmarkDetails);
- ViewHelper.setTranslationY(mPlacePage, 0);
+ mPlacePage.setTranslationY(0);
notifyVisibilityListener(false, false);
}
});
diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageLeftAnimationController.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageLeftAnimationController.java
index 6669bc3a66..c5eb40949f 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageLeftAnimationController.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageLeftAnimationController.java
@@ -1,5 +1,7 @@
package com.mapswithme.maps.widget.placepage;
+import android.animation.Animator;
+import android.animation.ValueAnimator;
import android.support.annotation.NonNull;
import android.support.v4.view.GestureDetectorCompat;
import android.view.GestureDetector;
@@ -10,9 +12,6 @@ import com.mapswithme.maps.MwmActivity;
import com.mapswithme.maps.bookmarks.data.MapObject;
import com.mapswithme.maps.widget.placepage.PlacePageView.State;
import com.mapswithme.util.UiUtils;
-import com.nineoldandroids.animation.Animator;
-import com.nineoldandroids.animation.ValueAnimator;
-import com.nineoldandroids.view.ViewHelper;
class PlacePageLeftAnimationController extends BasePlacePageAnimationController
{
@@ -132,13 +131,13 @@ class PlacePageLeftAnimationController extends BasePlacePageAnimationController
private void track(ValueAnimator animation)
{
float offset = (Float) animation.getAnimatedValue();
- ViewHelper.setTranslationX(mPlacePage, offset);
+ mPlacePage.setTranslationX(offset);
float slope = offset / mPlacePage.getDockedWidth();
- ViewHelper.setAlpha(mPlacePage, slope + 1.0f);
+ mPlacePage.setAlpha(slope + 1.0f);
if (!mPlacePage.isDocked())
- ViewHelper.setRotation(mPlacePage, slope * 20.0f);
+ mPlacePage.setRotation(slope * 20.0f);
MwmActivity.LeftAnimationTrackListener tracker = mPlacePage.getLeftAnimationTrackListener();
if (tracker != null)
@@ -152,12 +151,6 @@ class PlacePageLeftAnimationController extends BasePlacePageAnimationController
if (currentState != State.HIDDEN)
return;
- if (NO_ANIMATION)
- {
- notifyVisibilityListener(true, true);
- return;
- }
-
startTracking(false);
ValueAnimator animator = ValueAnimator.ofFloat(-mPlacePage.getDockedWidth(), 0.0f);
@@ -169,7 +162,7 @@ class PlacePageLeftAnimationController extends BasePlacePageAnimationController
track(animation);
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
@@ -186,13 +179,6 @@ class PlacePageLeftAnimationController extends BasePlacePageAnimationController
private void hidePlacePage()
{
- if (NO_ANIMATION)
- {
- UiUtils.hide(mPlacePage);
- notifyVisibilityListener(false, false);
- return;
- }
-
startTracking(true);
ValueAnimator animator = ValueAnimator.ofFloat(0.0f, -mPlacePage.getDockedWidth());
@@ -204,7 +190,7 @@ class PlacePageLeftAnimationController extends BasePlacePageAnimationController
track(animation);
}
});
- animator.addListener(new UiUtils.SimpleNineoldAnimationListener()
+ animator.addListener(new UiUtils.SimpleAnimatorListener()
{
@Override
public void onAnimationEnd(Animator animation)
diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
index a1c275807c..e9ae6f9565 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
@@ -189,16 +189,13 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
mLlOperator = (LinearLayout) mPpDetails.findViewById(R.id.ll__place_operator);
mLlOperator.setOnClickListener(this);
mTvOperator = (TextView) mPpDetails.findViewById(R.id.tv__place_operator);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
- {
- mLlLatlon.setOnLongClickListener(this);
- mLlAddress.setOnLongClickListener(this);
- mLlPhone.setOnLongClickListener(this);
- mLlWebsite.setOnLongClickListener(this);
- mLlSchedule.setOnLongClickListener(this);
- mLlEmail.setOnLongClickListener(this);
- mLlOperator.setOnLongClickListener(this);
- }
+ mLlLatlon.setOnLongClickListener(this);
+ mLlAddress.setOnLongClickListener(this);
+ mLlPhone.setOnLongClickListener(this);
+ mLlWebsite.setOnLongClickListener(this);
+ mLlSchedule.setOnLongClickListener(this);
+ mLlEmail.setOnLongClickListener(this);
+ mLlOperator.setOnLongClickListener(this);
mEtBookmarkName = (EditText) mPpDetails.findViewById(R.id.et__bookmark_name);
mTvNotes = (TextView) mPpDetails.findViewById(R.id.tv__bookmark_notes);
@@ -818,12 +815,8 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
}
@Override
- @SuppressLint("NewApi")
public boolean onLongClick(View v)
{
- // This callback is invoked only for API level >= 11.
- // See initViews function for more details.
-
final Object tag = v.getTag();
final String tagStr = tag == null ? "" : tag.toString();
AlohaHelper.logLongClick(tagStr);
diff --git a/android/src/com/mapswithme/util/UiUtils.java b/android/src/com/mapswithme/util/UiUtils.java
index a5ed0adb8f..eca36d5891 100644
--- a/android/src/com/mapswithme/util/UiUtils.java
+++ b/android/src/com/mapswithme/util/UiUtils.java
@@ -1,5 +1,6 @@
package com.mapswithme.util;
+import android.animation.Animator;
import android.app.Activity;
import android.content.DialogInterface;
import android.content.Intent;
@@ -27,10 +28,11 @@ import android.view.ViewTreeObserver;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
+import android.widget.ImageView;
import android.widget.TextView;
+
import com.mapswithme.maps.MwmApplication;
import com.mapswithme.maps.R;
-import com.nineoldandroids.animation.Animator;
import static com.mapswithme.util.Utils.checkNotNull;
@@ -54,8 +56,7 @@ public final class UiUtils
{}
}
-
- public static class SimpleNineoldAnimationListener implements Animator.AnimatorListener
+ public static class SimpleAnimatorListener implements Animator.AnimatorListener
{
@Override
public void onAnimationStart(Animator animation) {}
@@ -70,7 +71,7 @@ public final class UiUtils
public void onAnimationRepeat(Animator animation) {}
}
-
+
public static void waitLayout(final View view, @NonNull final ViewTreeObserver.OnGlobalLayoutListener callback)
{
view.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener()
@@ -375,8 +376,8 @@ public final class UiUtils
*/
public static void getHitRect(View v, Rect rect)
{
- rect.left = (int) com.nineoldandroids.view.ViewHelper.getX(v);
- rect.top = (int) com.nineoldandroids.view.ViewHelper.getY(v);
+ rect.left = (int) v.getX();
+ rect.top = (int) v.getY();
rect.right = rect.left + v.getWidth();
rect.bottom = rect.top + v.getHeight();
}
diff --git a/android/src/com/nvidia/devtech/NvEventQueueFragment.java b/android/src/com/nvidia/devtech/NvEventQueueFragment.java
index 2921dcccbf..d7c47f4a7f 100644
--- a/android/src/com/nvidia/devtech/NvEventQueueFragment.java
+++ b/android/src/com/nvidia/devtech/NvEventQueueFragment.java
@@ -82,7 +82,7 @@ public abstract class NvEventQueueFragment extends BaseMwmFragment implements Vi
mDisplayDensity = metrics.densityDpi;
mIsNativeLaunched = true;
onCreateNative();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && getActivity().isChangingConfigurations())
+ if (getActivity().isChangingConfigurations())
mIsRenderingInitialized = true;
}
@@ -163,12 +163,11 @@ public abstract class NvEventQueueFragment extends BaseMwmFragment implements Vi
onFocusChangedNative(getActivity().hasWindowFocus());
}
- @SuppressLint("NewApi")
@Override
public void onStop()
{
super.onStop();
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB || !getActivity().isChangingConfigurations())
+ if (!getActivity().isChangingConfigurations())
{
// if configuration is changed - EGL shouldn't be reinitialized
mIsRenderingInitialized = false;