Fix 2.3 crash

This commit is contained in:
Alexey Kulish 2016-02-27 19:33:31 +03:00
parent 5b86826305
commit aad61b6f8f
2 changed files with 3 additions and 3 deletions

View file

@ -1143,7 +1143,7 @@ public class OsmandSettings {
public final OsmandPreference<Boolean> SHOULD_SHOW_FREE_VERSION_BANNER = new BooleanPreference("should_show_free_version_banner", false).makeGlobal().cache();
public final OsmandPreference<Boolean> USE_MAP_MARKERS = new BooleanPreference("use_map_markers", false).makeGlobal().cache();
public final OsmandPreference<Boolean> USE_MAP_MARKERS = new BooleanPreference("use_map_markers", true).makeGlobal().cache();
public final CommonPreference<MapMarkersMode> MAP_MARKERS_MODE =
new EnumIntPreference<>("map_markers_mode", MapMarkersMode.TOOLBAR, MapMarkersMode.values());

View file

@ -715,7 +715,7 @@ public class SwipeDismissListViewTouchListener implements View.OnTouchListener {
}
if (mSwiping) {
mSwipeDownView.setTranslationX(deltaX);
ViewCompat.setTranslationX(mSwipeDownView, deltaX);
ViewCompat.setAlpha(mSwipeDownView, Math.max(0f, Math.min(1f,
1f - 2f * Math.abs(deltaX) / mViewWidth)));
return true;
@ -815,7 +815,7 @@ public class SwipeDismissListViewTouchListener implements View.OnTouchListener {
ViewGroup.LayoutParams lp;
for (PendingDismissData pendingDismiss : mPendingDismisses) {
ViewCompat.setAlpha(pendingDismiss.view, 1f);
pendingDismiss.view.setTranslationX(0);
ViewCompat.setTranslationX(pendingDismiss.view, 0);
lp = pendingDismiss.childView.getLayoutParams();
lp.height = originalLayoutHeight;
pendingDismiss.childView.setLayoutParams(lp);