forked from upstream-mirrors/OpenTracks
fix #698 added activity icon for kayaking
This commit is contained in:
@@ -38,6 +38,7 @@ public class TrackIconUtils {
|
||||
private static final String BIKE = "BIKE";
|
||||
private static final String MOUNTAIN_BIKE = "MOUNTAIN_BIKE";
|
||||
private static final String MOTOR_BIKE = "MOTOR_BIKE";
|
||||
private static final String KAYAK = "KAYAK";
|
||||
private static final String BOAT = "BOAT";
|
||||
private static final String SAILING = "SAILING";
|
||||
private static final String DRIVE = "DRIVE";
|
||||
@@ -67,6 +68,7 @@ public class TrackIconUtils {
|
||||
private static final int[] SKI_LIST = new int[]{R.string.activity_type_cross_country_skiing, R.string.activity_type_skiing};
|
||||
private static final int[] SNOW_BOARDING_LIST = new int[]{R.string.activity_type_snow_boarding};
|
||||
private static final int[] SKATE_BOARDING_LIST = new int[]{R.string.activity_type_skate_boarding};
|
||||
private static final int[] KAYAKING_LIST = new int[]{R.string.activity_type_kayaking};
|
||||
private static final int[] WALK_LIST = new int[]{R.string.activity_type_hiking, R.string.activity_type_off_trail_hiking, R.string.activity_type_speed_walking, R.string.activity_type_trail_hiking, R.string.activity_type_walking};
|
||||
|
||||
// List of icons whose sports associated use speed (in km/h or mi/h).
|
||||
@@ -78,7 +80,7 @@ public class TrackIconUtils {
|
||||
// All bike categories.
|
||||
R.string.activity_type_biking, R.string.activity_type_cycling, R.string.activity_type_dirt_bike, R.string.activity_type_motor_bike, R.string.activity_type_mountain_biking, R.string.activity_type_road_biking, R.string.activity_type_track_cycling, R.string.activity_type_inline_skating,
|
||||
// All boat categories.
|
||||
R.string.activity_type_boat, R.string.activity_type_ferry, R.string.activity_type_motor_boating, R.string.activity_type_rc_boat, R.string.activity_type_sailing,
|
||||
R.string.activity_type_boat, R.string.activity_type_ferry, R.string.activity_type_motor_boating, R.string.activity_type_rc_boat, R.string.activity_type_sailing, R.string.activity_type_kayaking,
|
||||
// All drive categories.
|
||||
R.string.activity_type_atv, R.string.activity_type_driving, R.string.activity_type_driving_bus, R.string.activity_type_driving_car, R.string.activity_type_escooter, R.string.activity_type_skate_boarding,
|
||||
// All wintersport categories
|
||||
@@ -104,6 +106,7 @@ public class TrackIconUtils {
|
||||
MAP.put(MOTOR_BIKE, new Pair<>(R.string.activity_type_motor_bike, R.drawable.ic_activity_motorbike_24dp));
|
||||
MAP.put(DRIVE, new Pair<>(R.string.activity_type_driving, R.drawable.ic_activity_drive_24dp));
|
||||
MAP.put(AIRPLANE, new Pair<>(R.string.activity_type_airplane, R.drawable.ic_activity_flight_24dp));
|
||||
MAP.put(KAYAK, new Pair<>(R.string.activity_type_kayaking, R.drawable.ic_activity_kayaking_24dp));
|
||||
MAP.put(BOAT, new Pair<>(R.string.activity_type_boat, R.drawable.ic_activity_boat_24dp));
|
||||
MAP.put(SAILING, new Pair<>(R.string.activity_type_sailing, R.drawable.ic_activity_sailing_24dp));
|
||||
}
|
||||
@@ -170,6 +173,9 @@ public class TrackIconUtils {
|
||||
if (inList(context, activityType, MOTOR_BIKE_LIST)) {
|
||||
return MOTOR_BIKE;
|
||||
}
|
||||
if (inList(context, activityType, KAYAKING_LIST)) {
|
||||
return KAYAK;
|
||||
}
|
||||
if (inList(context, activityType, BOAT_LIST)) {
|
||||
return BOAT;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector android:height="24dp" android:viewportHeight="21.99934"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="21.84952" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#ffffff"
|
||||
android:pathData="m18.296,13.5167c-1.0171,-0.0182 -1.9033,0.7707 -2.9456,0.5005 -0.9523,-0.2718 -1.9505,-0.7655 -2.9493,-0.3389 -0.9384,0.4921 -2.0789,0.4938 -3.017,0C8.3845,13.2515 7.3852,13.7448 6.4322,14.0172 5.2299,14.312 4.2005,13.2564 2.9984,13.5587 2.2077,13.8068 1.0222,14.113 1.0222,14.113v1.7649c1.0227,0.0195 1.9128,-0.7764 2.9601,-0.4982 0.4417,0.2168 1.6682,0.3639 1.653,0.6019l-1.3879,1.3835c-0.7386,-0.5021 -1.5119,0.0527 -1.9901,0.6253 -0.5088,0.568 -1.1635,1.0259 -1.5505,1.6871 -0.4461,0.9528 0.6577,2.0565 1.6105,1.6105 0.7017,-0.428 1.2007,-1.1229 1.8094,-1.6725 0.6219,-0.4296 0.7776,-1.2477 0.6298,-1.8616l2.0038,-1.999c0.9554,-0.4404 2.0942,-0.6063 3.0559,-0.0798 0.9567,0.4291 1.9816,0.0931 2.8934,-0.2638 1.0381,-0.3395 1.9553,0.3821 2.956,0.4619 1.0872,0.1057 2.0198,-0.7841 3.1216,-0.4936 0.5567,-0.0151 1.9432,1.034 1.9777,0.1483v-1.4713c-0.8787,0.0509 -1.5921,-0.5889 -2.4688,-0.5401z" android:strokeWidth="0.20758"/>
|
||||
<path android:fillColor="#ffffff"
|
||||
android:pathData="M19.1355,4.6094C19.7777,3.924 20.5181,3.3189 21.0906,2.576 21.6308,1.6723 20.6318,0.4635 19.6424,0.8157 18.9521,1.1178 18.5254,1.7969 17.9665,2.2834 17.4409,2.7778 16.7484,3.4079 17.1237,4.208 17.3165,4.5792 16.6709,4.8231 16.4793,5.1359L15.0659,6.5509C13.4595,5.957 11.8493,5.3584 10.2468,4.7652 9.2046,4.531 8.2546,5.3828 8.1061,6.3824 7.7002,7.769 7.2645,9.148 6.8777,10.5394h-5.8511v2.3662c1.0341,-0.0658 1.9719,-0.79 3.0482,-0.4914 0.8515,0.1826 1.7033,0.7429 2.5975,0.3773 1.0893,-0.5536 2.4097,-0.5626 3.4983,-0.0022 0.896,0.3687 1.7515,-0.1904 2.6047,-0.3752 1.0783,-0.3027 2.0158,0.4279 3.0515,0.4909 0.9851,-0.0775 1.8675,-0.4708 2.8841,-0.5791 0.8477,-0.0903 2.1639,-1.7856 2.1639,-1.7856 0,0 -1.8192,-0.0154 -2.9351,0.0029 -1.9905,-0.0002 -3.9809,-0.0021 -5.9714,-0.0044l2.4839,-2.4814c0.7624,0.5727 1.957,-0.3878 1.2027,-1.1977l2.0322,-2.0397c0.4628,0.252 1.0792,0.1707 1.4483,-0.2105zM11.0752,10.5394c-0.4865,0.1015 -0.6121,-0.0654 -0.3745,-0.5026l0.9094,-3.0294 2.1896,0.81z" android:strokeWidth="0.20758"/>
|
||||
<path android:fillColor="#ffffff"
|
||||
android:pathData="m12.5202,2.6733c0.0551,1.1808 -1.4064,2.0133 -2.3942,1.3656 -1.0445,-0.5537 -1.0179,-2.2353 0.0433,-2.7559 1.0184,-0.592 2.3788,0.2078 2.3509,1.3903z" android:strokeWidth="1.16861"/>
|
||||
</vector>
|
||||
Reference in New Issue
Block a user