Merge remote-tracking branch 'origin/master'
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_action_time.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_action_time_to_distance.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_action_altitude.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_action_speed.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_action_time.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_action_time_to_distance.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_action_altitude.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_action_speed.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_action_time.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/ic_action_time_to_distance.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.8 KiB |
|
@ -15,7 +15,7 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:src="@drawable/ic_action_info_dark" />
|
||||
tools:src="@drawable/ic_action_gabout_dark" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/options_button_background"
|
||||
android:src="@drawable/ic_action_info_dark"/>
|
||||
android:src="@drawable/ic_action_gabout_dark"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<dimen name="map_alarm_bottom_margin">140dp</dimen>
|
||||
<dimen name="map_alarm_bottom_margin_land">78dp</dimen>
|
||||
<dimen name="map_button_shadow_height">127dp</dimen>
|
||||
<dimen name="map_button_shadow_height">112dp</dimen>
|
||||
<dimen name="map_widget_icon">32dp</dimen>
|
||||
<dimen name="map_widget_height">48dp</dimen>
|
||||
<dimen name="map_widget_image">120dp</dimen>
|
||||
|
|
|
@ -134,11 +134,7 @@ public abstract class DashLocationFragment extends DashBaseFragment {
|
|||
arrowResId = R.drawable.ic_destination_arrow_white;
|
||||
}
|
||||
DirectionDrawable dd = (DirectionDrawable) arrow.getDrawable();
|
||||
if (paint) {
|
||||
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance);
|
||||
} else {
|
||||
dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_white);
|
||||
}
|
||||
if (fromLoc == null || h == null) {
|
||||
dd.setAngle(0);
|
||||
} else {
|
||||
|
|
|
@ -185,7 +185,7 @@ public class GpxUiHelper {
|
|||
s = s.replace('_', ' ');
|
||||
|
||||
adapter.item(s).selected(multipleChoice ? 0 : -1)
|
||||
.iconColor(R.drawable.ic_action_info_dark).reg();
|
||||
.iconColor(R.drawable.ic_action_polygom_dark).reg();
|
||||
|
||||
//if there's some selected files - need to mark them as selected
|
||||
if (selectedGpxList != null) {
|
||||
|
|
|
@ -472,7 +472,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
menuItem.setTitleCondensed(getString(R.string.osmo_follow));
|
||||
}
|
||||
if (group != null) {
|
||||
createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_info_dark,
|
||||
createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_gabout_dark,
|
||||
MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
|
||||
}
|
||||
if ((group != null && !group.isMainGroup()) || (device != null && device.getGroup().isMainGroup())) {
|
||||
|
@ -888,7 +888,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
}
|
||||
};
|
||||
ImageButton info = (ImageButton) v.findViewById(R.id.info);
|
||||
info.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_info_dark));
|
||||
info.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_gabout_dark));
|
||||
info.setOnClickListener(click);
|
||||
warnCreateDesc.setOnClickListener(click);
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.app.AlertDialog;
|
|||
import android.content.DialogInterface;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -11,7 +12,6 @@ import android.view.ViewGroup;
|
|||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
|
@ -19,6 +19,7 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||
import net.osmand.plus.helpers.FontCache;
|
||||
import net.osmand.plus.views.DirectionDrawable;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
|
|
|
@ -487,7 +487,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
|||
if(layers.getContextMenuLayer().getFirstSelectedObject() instanceof StageFavorite) {
|
||||
final StageFavorite sf = ((StageFavorite)layers.getContextMenuLayer().getFirstSelectedObject());
|
||||
if(selectedStage != null) {
|
||||
adapter.item(R.string.show_waypoint_information).iconColor(R.drawable.ic_action_info_dark).position(0)
|
||||
adapter.item(R.string.show_waypoint_information).iconColor(R.drawable.ic_action_gabout_dark).position(0)
|
||||
.listen(new OnContextMenuClick() {
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||
|
@ -561,7 +561,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
|||
}).reg();
|
||||
}
|
||||
//important info
|
||||
adapter.item(R.string.sherpafy_tour_info_txt).iconColor(R.drawable.ic_action_info_dark)
|
||||
adapter.item(R.string.sherpafy_tour_info_txt).iconColor(R.drawable.ic_action_gabout_dark)
|
||||
.listen(new OnContextMenuClick() {
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||
|
|
|
@ -33,15 +33,16 @@ public class DirectionDrawable extends Drawable {
|
|||
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
|
||||
arrowImage = iconsCache.getIcon(resourceId, clrId);
|
||||
this.resourceId = resourceId;
|
||||
onBoundsChange(getBounds());
|
||||
}
|
||||
|
||||
public void setImage(int resourceId){
|
||||
public void setImage(int resourceId) {
|
||||
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
|
||||
arrowImage = iconsCache.getIcon(resourceId, 0);
|
||||
this.resourceId = resourceId;
|
||||
onBoundsChange(getBounds());
|
||||
}
|
||||
|
||||
|
||||
public DirectionDrawable(Context ctx, float width, float height) {
|
||||
this.ctx = ctx;
|
||||
this.width = width;
|
||||
|
@ -75,23 +76,49 @@ public class DirectionDrawable extends Drawable {
|
|||
this.angle = angle;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getIntrinsicWidth() {
|
||||
if (arrowImage != null) {
|
||||
return arrowImage.getIntrinsicWidth();
|
||||
}
|
||||
return super.getIntrinsicWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIntrinsicHeight() {
|
||||
if (arrowImage != null) {
|
||||
return arrowImage.getIntrinsicHeight();
|
||||
}
|
||||
return super.getIntrinsicHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBoundsChange(Rect bounds) {
|
||||
super.onBoundsChange(bounds);
|
||||
if (arrowImage != null) {
|
||||
Rect r = getBounds();
|
||||
int w = arrowImage.getIntrinsicWidth();
|
||||
int h = arrowImage.getIntrinsicHeight();
|
||||
int dx = r.width() - w;
|
||||
int dy = r.height() - h;
|
||||
arrowImage.setBounds(r.left + dx / 2, r.top + dy / 2, r.right - dx / 2, r.bottom - dy / 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
canvas.save();
|
||||
if (arrowImage != null) {
|
||||
canvas.rotate(angle, canvas.getHeight() / 2, canvas.getWidth() / 2);
|
||||
arrowImage.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
Rect r = getBounds();
|
||||
canvas.rotate(angle, r.centerX(), r.centerY());
|
||||
arrowImage.draw(canvas);
|
||||
// TODO delete?
|
||||
// Bitmap arrow = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);
|
||||
// Canvas canv = new Canvas(arrow);
|
||||
// arrowImage.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
// arrowImage.draw(canv);
|
||||
// canvas.drawBitmap(arrow, null, new Rect(0, 0, arrow.getHeight(), arrow.getWidth()), null);
|
||||
} else {
|
||||
canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth() / 2);
|
||||
canvas.rotate(angle, canvas.getWidth() / 2, canvas.getHeight() / 2);
|
||||
Path directionPath = createDirectionPath();
|
||||
canvas.drawPath(directionPath, paintRouteDirection);
|
||||
}
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -453,7 +453,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
// && (!routeFollowingMode || settings.SHOW_ZOOM_BUTTONS_NAVIGATION.get());
|
||||
boolean showButtons = routePlanningMode || !routeFollowingMode || (System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS);
|
||||
updateMyLocation(rh);
|
||||
routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_info_dark : R.drawable.ic_action_gdirections_dark );
|
||||
routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.ic_action_gdirections_dark );
|
||||
routePlanningBtn.updateVisibility(showButtons && !routePlanningMode);
|
||||
|
||||
menuControl.setIconResId(settings.USE_DASHBOARD_INSTEAD_OF_DRAWER.get() ? R.drawable.ic_dashboard_dark
|
||||
|
|