Skip to content

Commit dd198ef

Browse files
committed
SleepTimer: update icons
1 parent f441aaa commit dd198ef

File tree

19 files changed

+78
-94
lines changed

19 files changed

+78
-94
lines changed

app/src/main/java/com/thewizrd/simplesleeptimer/SleepTimerActivity.kt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -420,21 +420,19 @@ class SleepTimerActivity : AppCompatActivity() {
420420
viewTreeObserver.removeOnPreDrawListener(this)
421421
}
422422

423-
val distanceY =
424-
toView.context.resources.getDimensionPixelSize(R.dimen.mtrl_transition_shared_axis_slide_distance)
425-
.toFloat()
426-
val translationDistance = if (!isRunning) distanceY else -distanceY
423+
val distanceX = -toView.measuredWidth / 2f
424+
val translationDistance = if (!isRunning) distanceX else -distanceX
427425

428-
toView.translationY = -translationDistance
429-
currentView.translationY = 0f
426+
toView.translationX = -translationDistance
427+
currentView.translationX = 0f
430428
toView.alpha = 0f
431429
currentView.alpha = 1f
432430

433431
val translateCurrent = ObjectAnimator.ofFloat(
434432
currentView,
435-
View.TRANSLATION_Y, translationDistance
433+
View.TRANSLATION_X, translationDistance
436434
)
437-
val translateNew = ObjectAnimator.ofFloat(toView, View.TRANSLATION_Y, 0f)
435+
val translateNew = ObjectAnimator.ofFloat(toView, View.TRANSLATION_X, 0f)
438436
val translationAnimatorSet = AnimatorSet().apply {
439437
playTogether(translateCurrent, translateNew)
440438
duration = animDuration
@@ -507,8 +505,8 @@ class SleepTimerActivity : AppCompatActivity() {
507505
animatorSet.addListener(object : AnimatorListenerAdapter() {
508506
override fun onAnimationEnd(animation: Animator) {
509507
super.onAnimationEnd(animation)
510-
currentView.translationY = 0f
511-
toView.translationY = 0f
508+
currentView.translationX = 0f
509+
toView.translationX = 0f
512510
currentView.alpha = 1f
513511
toView.alpha = 1f
514512
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<vector android:height="24dp"
2-
android:tint="#FFFFFF"
3-
android:viewportHeight="24"
4-
android:viewportWidth="24"
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
52
android:width="24dp"
6-
xmlns:android="http://schemas.android.com/apk/res/android">
3+
android:height="24dp"
4+
android:viewportWidth="960"
5+
android:viewportHeight="960"
6+
android:tint="@android:color/white">
77
<path
88
android:fillColor="@android:color/white"
9-
android:pathData="M20,12c0,-2.54 -1.19,-4.81 -3.04,-6.27L16,0H8l-0.95,5.73C5.19,7.19 4,9.45 4,12s1.19,4.81 3.05,6.27L8,24h8l0.96,-5.73C18.81,16.81 20,14.54 20,12zM6,12c0,-3.31 2.69,-6 6,-6s6,2.69 6,6 -2.69,6 -6,6 -6,-2.69 -6,-6z" />
9+
android:pathData="M420,880Q394,880 372.5,864.5Q351,849 343,823L320,746Q314,726 301.5,705.5Q289,685 269,663Q235,626 217.5,579Q200,532 200,480Q200,429 217.5,382Q235,335 269,297Q289,274 301.5,254Q314,234 320,214L343,137Q351,111 372.5,95.5Q394,80 420,80L540,80Q566,80 587.5,95.5Q609,111 617,137L640,214Q646,234 658.5,254.5Q671,275 691,297Q725,334 742.5,381Q760,428 760,480Q760,531 742.5,578Q725,625 691,663Q671,686 658.5,706Q646,726 640,746L617,823Q609,849 587.5,864.5Q566,880 540,880L420,880ZM480,680Q563,680 621.5,621.5Q680,563 680,480Q680,397 621.5,338.5Q563,280 480,280Q397,280 338.5,338.5Q280,397 280,480Q280,563 338.5,621.5Q397,680 480,680Z" />
1010
</vector>
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
<vector android:height="24dp"
2-
android:tint="#FFFFFF"
3-
android:viewportHeight="24.0"
4-
android:viewportWidth="24.0"
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
52
android:width="24dp"
6-
xmlns:android="http://schemas.android.com/apk/res/android">
3+
android:height="24dp"
4+
android:tint="#FFFFFF"
5+
android:viewportWidth="960"
6+
android:viewportHeight="960">
7+
78
<path
8-
android:fillColor="#FF000000"
9-
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
9+
android:fillColor="@android:color/white"
10+
android:pathData="M480,536L284,732Q273,743 256,743Q239,743 228,732Q217,721 217,704Q217,687 228,676L424,480L228,284Q217,273 217,256Q217,239 228,228Q239,217 256,217Q273,217 284,228L480,424L676,228Q687,217 704,217Q721,217 732,228Q743,239 743,256Q743,273 732,284L536,480L732,676Q743,687 743,704Q743,721 732,732Q721,743 704,743Q687,743 676,732L480,536Z" />
11+
1012
</vector>
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
<vector android:height="24dp"
2-
android:tint="#FFFFFF"
3-
android:viewportHeight="24"
4-
android:viewportWidth="24"
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
52
android:width="24dp"
6-
xmlns:android="http://schemas.android.com/apk/res/android">
3+
android:height="24dp"
4+
android:viewportWidth="960"
5+
android:viewportHeight="960"
6+
android:tint="@android:color/white">
77
<path
88
android:fillColor="@android:color/white"
9-
android:pathData="M12,5V2L8,6l4,4V7c3.31,0 6,2.69 6,6c0,2.97 -2.17,5.43 -5,5.91v2.02c3.95,-0.49 7,-3.85 7,-7.93C20,8.58 16.42,5 12,5z" />
10-
<path
11-
android:fillColor="@android:color/white"
12-
android:pathData="M6,13c0,-1.65 0.67,-3.15 1.76,-4.24L6.34,7.34C4.9,8.79 4,10.79 4,13c0,4.08 3.05,7.44 7,7.93v-2.02C8.17,18.43 6,15.97 6,13z" />
9+
android:pathData="M393,828Q290,799 225,714.5Q160,630 160,520Q160,463 179,411.5Q198,360 233,317Q244,305 260,304.5Q276,304 289,317Q300,328 300.5,344Q301,360 290,374Q266,405 253,442Q240,479 240,520Q240,601 287.5,664.5Q335,728 410,751Q423,755 431.5,766Q440,777 440,790Q440,810 426,821.5Q412,833 393,828ZM567,828Q548,833 534,821Q520,809 520,789Q520,777 528.5,766Q537,755 550,751Q625,727 672.5,664Q720,601 720,520Q720,420 650,350Q580,280 480,280L477,280L493,296Q504,307 504,324Q504,341 493,352Q482,363 465,363Q448,363 437,352L353,268Q347,262 344.5,255Q342,248 342,240Q342,232 344.5,225Q347,218 353,212L437,128Q448,117 465,117Q482,117 493,128Q504,139 504,156Q504,173 493,184L477,200L480,200Q614,200 707,293Q800,386 800,520Q800,629 735,714Q670,799 567,828Z" />
1310
</vector>

shared_resources/src/main/res/drawable/ic_hourglass_empty.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
android:pivotY="480">
1111
<path
1212
android:fillColor="@android:color/white"
13-
android:pathData="M320,800L640,800L640,680Q640,614 593,567Q546,520 480,520Q414,520 367,567Q320,614 320,680L320,800ZM480,440Q546,440 593,393Q640,346 640,280L640,160L320,160L320,280Q320,346 367,393Q414,440 480,440ZM160,880L160,800L240,800L240,680Q240,619 268.5,565.5Q297,512 348,480Q297,448 268.5,394.5Q240,341 240,280L240,160L160,160L160,80L800,80L800,160L720,160L720,280Q720,341 691.5,394.5Q663,448 612,480Q663,512 691.5,565.5Q720,619 720,680L720,800L800,800L800,880L160,880ZM480,800L480,800Q480,800 480,800Q480,800 480,800Q480,800 480,800Q480,800 480,800L480,800ZM480,160Q480,160 480,160Q480,160 480,160L480,160L480,160L480,160Q480,160 480,160Q480,160 480,160Z" />
13+
android:pathData="M320,800L640,800L640,680Q640,614 593,567Q546,520 480,520Q414,520 367,567Q320,614 320,680L320,800ZM480,440Q546,440 593,393Q640,346 640,280L640,160L320,160L320,280Q320,346 367,393Q414,440 480,440ZM200,880Q183,880 171.5,868.5Q160,857 160,840Q160,823 171.5,811.5Q183,800 200,800L240,800L240,680Q240,619 268.5,565.5Q297,512 348,480Q297,448 268.5,394.5Q240,341 240,280L240,160L200,160Q183,160 171.5,148.5Q160,137 160,120Q160,103 171.5,91.5Q183,80 200,80L760,80Q777,80 788.5,91.5Q800,103 800,120Q800,137 788.5,148.5Q777,160 760,160L720,160L720,280Q720,341 691.5,394.5Q663,448 612,480Q663,512 691.5,565.5Q720,619 720,680L720,800L760,800Q777,800 788.5,811.5Q800,823 800,840Q800,857 788.5,868.5Q777,880 760,880L200,880ZM480,800L480,800Q480,800 480,800Q480,800 480,800Q480,800 480,800Q480,800 480,800L480,800ZM480,160Q480,160 480,160Q480,160 480,160L480,160L480,160L480,160Q480,160 480,160Q480,160 480,160Z" />
1414
</group>
1515
</vector>
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
22
android:width="24dp"
33
android:height="24dp"
4-
android:viewportWidth="6.35"
5-
android:viewportHeight="6.35">
6-
<path
7-
android:pathData="m3.9645,0.508h-1.579v0.508h1.579zM5.0251,2.1311 L5.3988,1.77042c-0.11316,-0.12954 -0.23686,-0.25146 -0.37107,-0.35814l-0.3737,0.36068c-0.40792,-0.31496 -0.9211,-0.50292 -1.479,-0.50292 -1.308,0 -2.3686,1.0236 -2.3686,2.286 0,1.2624 1.058,2.286 2.3686,2.286 1.3106,0 2.3686,-1.0236 2.3686,-2.286 0,-0.53848 -0.19475,-1.0338 -0.51845,-1.4249zM3.175,5.334c-1.0185,0 -1.8422,-0.79502 -1.8422,-1.778 0,-0.98298 0.82373,-1.778 1.8422,-1.778 1.0185,0 1.8422,0.79502 1.8422,1.778 0,0.98298 -0.82373,1.778 -1.8422,1.778z"
8-
android:strokeWidth=".25854"
9-
android:fillColor="#fff" />
10-
<path
11-
android:pathData="m3.087,3.6152c-0.24995,-0.25013 -0.31703,-0.61143 -0.20634,-0.92417 -0.12093,0.04278 -0.23527,0.1097 -0.3319,0.20634 -0.34694,0.34694 -0.34694,0.9093 0,1.2561 0.34677,0.34678 0.90897,0.34695 1.2559,0 0.09697,-0.09663 0.16372,-0.21097 0.20634,-0.3319 -0.31256,0.11069 -0.67404,0.04362 -0.92401,-0.20633z"
12-
android:strokeWidth=".00793"
13-
android:fillColor="#fff" />
4+
android:viewportWidth="28.575"
5+
android:viewportHeight="28.575">
6+
<path
7+
android:pathData="m13.167,12.543c-11.714,-11.59 -11.714,-11.59 0,0zM12.862,5.758c-0.357,0 -0.662,-0.126 -0.914,-0.378 -0.252,-0.252 -0.378,-0.556 -0.378,-0.914 0,-0.357 0.126,-0.662 0.378,-0.914 0.252,-0.252 0.556,-0.378 0.914,-0.378l3.85,0c0.357,0 0.662,0.126 0.914,0.378 0.252,0.252 0.378,0.556 0.378,0.914 0,0.357 -0.126,0.662 -0.378,0.914 -0.252,0.252 -0.556,0.378 -0.914,0.378zM14.787,25.4C13.488,25.4 12.269,25.152 11.13,24.657 9.991,24.161 8.996,23.488 8.144,22.636 7.293,21.784 6.619,20.789 6.124,19.651 5.628,18.512 5.381,17.293 5.381,15.993c0,-1.3 0.248,-2.519 0.743,-3.657 0.496,-1.139 1.169,-2.134 2.021,-2.986 0.852,-0.852 1.847,-1.525 2.986,-2.021 1.139,-0.495 2.358,-0.743 3.657,-0.743 1.03,0 2.019,0.154 2.966,0.463 0.947,0.309 1.835,0.772 2.664,1.389l0.731,-0.731c0.26,-0.26 0.565,-0.39 0.914,-0.39 0.349,0 0.654,0.13 0.914,0.39 0.26,0.26 0.39,0.565 0.39,0.914 0,0.349 -0.13,0.654 -0.39,0.914l-0.731,0.731c0.666,0.877 1.158,1.795 1.474,2.754 0.317,0.959 0.475,1.95 0.475,2.973 0,1.3 -0.248,2.519 -0.743,3.657 -0.496,1.139 -1.169,2.134 -2.021,2.986 -0.852,0.852 -1.847,1.525 -2.986,2.021C17.306,25.152 16.087,25.4 14.787,25.4ZM14.787,22.817c1.885,0 3.493,-0.666 4.825,-1.998 1.332,-1.332 1.998,-2.941 1.998,-4.825 0,-1.885 -0.666,-3.493 -1.998,-4.825 -1.332,-1.332 -2.941,-1.998 -4.825,-1.998 -1.885,0 -3.493,0.666 -4.825,1.998 -1.332,1.332 -1.998,2.941 -1.998,4.825 0,1.885 0.666,3.493 1.998,4.825 1.332,1.332 2.941,1.998 4.825,1.998z"
8+
android:fillColor="#ffffff" />
9+
<path
10+
android:pathData="m14.98,20.255c-0.558,0 -1.081,-0.106 -1.57,-0.319 -0.488,-0.212 -0.915,-0.501 -1.28,-0.866 -0.365,-0.365 -0.653,-0.791 -0.866,-1.28 -0.212,-0.488 -0.319,-1.012 -0.319,-1.57 0,-0.78 0.208,-1.497 0.623,-2.15 0.415,-0.653 0.975,-1.154 1.679,-1.503 0.247,-0.127 0.49,-0.122 0.728,0.014 0.238,0.136 0.369,0.344 0.395,0.623 0.044,0.476 0.154,0.932 0.328,1.37 0.174,0.438 0.43,0.825 0.766,1.161 0.336,0.336 0.721,0.59 1.156,0.761 0.434,0.171 0.886,0.282 1.356,0.333 0.273,0.032 0.485,0.152 0.637,0.362 0.152,0.209 0.178,0.425 0.076,0.647 -0.33,0.736 -0.828,1.322 -1.494,1.76 -0.666,0.438 -1.405,0.656 -2.217,0.656z"
11+
android:strokeWidth="0.01"
12+
android:fillColor="#ffffff" />
1413
</vector>

shared_resources/src/main/res/drawable/ic_logo_splash.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
22
android:width="24dp"
33
android:height="24dp"
4-
android:viewportWidth="24.0"
5-
android:viewportHeight="24.0">
4+
android:viewportWidth="960"
5+
android:viewportHeight="960"
6+
android:tint="@android:color/white">
67
<path
7-
android:fillColor="#FFFFFFFF"
8-
android:pathData="M12,3v10.55c-0.59,-0.34 -1.27,-0.55 -2,-0.55 -2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4V7h4V3h-6z" />
8+
android:fillColor="@android:color/white"
9+
android:pathData="M400,840Q334,840 287,793Q240,746 240,680Q240,614 287,567Q334,520 400,520Q423,520 442.5,525.5Q462,531 480,542L480,160Q480,143 491.5,131.5Q503,120 520,120L680,120Q697,120 708.5,131.5Q720,143 720,160L720,240Q720,257 708.5,268.5Q697,280 680,280L560,280L560,680Q560,746 513,793Q466,840 400,840Z" />
910
</vector>
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
22
android:width="24dp"
33
android:height="24dp"
4-
android:viewportWidth="24.0"
5-
android:viewportHeight="24.0">
4+
android:viewportWidth="960"
5+
android:viewportHeight="960"
6+
android:tint="@android:color/white">
67
<path
7-
android:fillColor="#FFFFFFFF"
8-
android:pathData="M8,5v14l11,-7z" />
8+
android:fillColor="@android:color/white"
9+
android:pathData="M320,687L320,273Q320,256 332,244.5Q344,233 360,233Q365,233 370.5,234.5Q376,236 381,239L707,446Q716,452 720.5,461Q725,470 725,480Q725,490 720.5,499Q716,508 707,514L381,721Q376,724 370.5,725.5Q365,727 360,727Q344,727 332,715.5Q320,704 320,687Z" />
910
</vector>
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<vector android:height="24dp"
2-
android:tint="#FFFFFF"
3-
android:viewportHeight="24.0"
4-
android:viewportWidth="24.0"
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
52
android:width="24dp"
6-
xmlns:android="http://schemas.android.com/apk/res/android">
3+
android:height="24dp"
4+
android:viewportWidth="960"
5+
android:viewportHeight="960"
6+
android:tint="@android:color/white">
77
<path
8-
android:fillColor="#FF000000"
9-
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,16.5v-9l6,4.5 -6,4.5z" />
8+
android:fillColor="@android:color/white"
9+
android:pathData="M426,630L621,505Q635,496 635,480Q635,464 621,455L426,330Q411,320 395.5,328.5Q380,337 380,355L380,605Q380,623 395.5,631.5Q411,640 426,630ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880Z" />
1010
</vector>

0 commit comments

Comments
 (0)