update layout

This commit is contained in:
Victor Shcherb 2015-04-15 11:18:08 +03:00
parent fd695018d1
commit 072087ae2c
4 changed files with 8 additions and 6 deletions

View file

@ -88,7 +88,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dp"
android:layout_marginLeft="2dp"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/showAllButtonTextSize" />
</LinearLayout>

View file

@ -69,6 +69,7 @@
android:id="@+id/type_name_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="4dp"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_small_group" />

View file

@ -149,7 +149,8 @@ public class MapActivity extends AccessibleActivity {
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
mapView = new OsmandMapTileView(this);
mapView = new OsmandMapTileView(this, getWindow().getDecorView().getWidth(),
getWindow().getDecorView().getHeight());
mapActions = new MapActivityActions(this);
mapLayers = new MapActivityLayers(this);
if (mapViewTrackingUtilities == null) {

View file

@ -166,13 +166,13 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
}
};
public OsmandMapTileView(Activity activity) {
public OsmandMapTileView(Activity activity, int w, int h) {
this.activity = activity;
init(activity);
init(activity, w, h);
}
// ///////////////////////////// INITIALIZING UI PART ///////////////////////////////////
public void init(Context ctx) {
public void init(Context ctx, int w, int h) {
application = (OsmandApplication) ctx.getApplicationContext();
settings = application.getSettings();
@ -217,7 +217,7 @@ public class OsmandMapTileView implements IMapDownloaderCallback {
LatLon ll = settings.getLastKnownMapLocation();
currentViewport = new RotatedTileBox.RotatedTileBoxBuilder().
setLocation(ll.getLatitude(), ll.getLongitude()).setZoom(settings.getLastKnownMapZoom()).
setPixelDimensions(400, 700).build();
setPixelDimensions(w, h).build();
currentViewport.setDensity(dm.density);
currentViewport.setMapDensity(getSettingsMapDensity());
}