Merge branch 'r3.4'
This commit is contained in:
commit
00073d2577
4 changed files with 20 additions and 4 deletions
|
@ -48,7 +48,7 @@ public class SQLiteTileSource implements ITileSource {
|
|||
private String rule = null;
|
||||
private String referer = null;
|
||||
|
||||
static final int tileSize = 256;
|
||||
int tileSize = 256;
|
||||
private OsmandApplication ctx;
|
||||
private boolean onlyReadonlyAvailable = false;
|
||||
|
||||
|
@ -355,6 +355,9 @@ public class SQLiteTileSource implements ITileSource {
|
|||
if(bmp == null) {
|
||||
// broken image delete it
|
||||
db.execSQL("DELETE FROM tiles WHERE x = ? AND y = ? AND z = ?", params);
|
||||
} else if(tileSize != bmp.getHeight() && tileSize != bmp.getWidth() &&
|
||||
bmp.getWidth() > 0) {
|
||||
tileSize = bmp.getWidth();
|
||||
}
|
||||
return bmp;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.app.Activity;
|
|||
import android.content.res.Configuration;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Build.VERSION_CODES;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -92,7 +93,11 @@ public class AppModeDialog {
|
|||
LinearLayout container = ll.findViewById(R.id.app_modes_content);
|
||||
int s = container.getChildAt(idx) != null ? container.getChildAt(idx).getRight() : 0;
|
||||
scrollView.scrollTo(s - scrollView.getWidth() > 0 ? s - scrollView.getWidth() : 0, 0);
|
||||
ll.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
|
||||
ll.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
} else {
|
||||
ll.getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
}
|
||||
}
|
||||
};
|
||||
ll.getViewTreeObserver().addOnGlobalLayoutListener(globalListener);
|
||||
|
|
|
@ -16,6 +16,7 @@ import android.content.DialogInterface;
|
|||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.os.Build.VERSION;
|
||||
import android.os.Build.VERSION_CODES;
|
||||
import android.os.Bundle;
|
||||
|
@ -325,7 +326,9 @@ public class EditProfileFragment extends BaseOsmAndFragment {
|
|||
popupWindow.setAnchorView(selectColorBtn);
|
||||
popupWindow.setContentWidth(AndroidUtils.dpToPx(activity, 200f));
|
||||
popupWindow.setModal(true);
|
||||
popupWindow.setDropDownGravity(Gravity.TOP | Gravity.RIGHT);
|
||||
if (Build.VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
|
||||
popupWindow.setDropDownGravity(Gravity.TOP | Gravity.RIGHT);
|
||||
}
|
||||
popupWindow.setVerticalOffset(AndroidUtils.dpToPx(activity, -48f));
|
||||
popupWindow.setHorizontalOffset(AndroidUtils.dpToPx(activity, -6f));
|
||||
final ProfileColorAdapter profileColorAdapter = new ProfileColorAdapter(activity, mode.getIconColorInfo());
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.content.DialogInterface.OnDismissListener;
|
|||
import android.graphics.PointF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Build.VERSION_CODES;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.ColorRes;
|
||||
import android.support.annotation.DrawableRes;
|
||||
|
@ -855,7 +856,11 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
LinearLayout container = ll.findViewById(R.id.app_modes_content);
|
||||
int s = container.getChildAt(idx) != null ? container.getChildAt(idx).getRight() + rightTogglePadding : 0;
|
||||
scrollView.scrollTo(s - scrollView.getWidth() > 0 ? s - scrollView.getWidth() : 0, 0);
|
||||
ll.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
|
||||
ll.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||
} else {
|
||||
ll.getViewTreeObserver().removeGlobalOnLayoutListener(this);
|
||||
}
|
||||
}
|
||||
};
|
||||
ll.getViewTreeObserver().addOnGlobalLayoutListener(globalListener);
|
||||
|
|
Loading…
Reference in a new issue