Skip to content

Commit 85273be

Browse files
authored
Merge pull request #17 from tuuhin/onboarding
New Onboarding Flow & Improvements in App Settings
2 parents 75497a9 + b6e8748 commit 85273be

74 files changed

Lines changed: 1545 additions & 350 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENCE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Tuhin Bhowmick
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# :studio_microphone: RecorderApp
22

33
An android audio recorder app, designed to simplify the process of capturing and managing
4-
recordings.
5-
With a clean and intuitive interface, this app offers a seamless user experience.
4+
recordings. With a clean and intuitive interface, this app offers a seamless user experience.
65

76
## 💁 About
87

9-
A fully functioned recorder app with an ability to record over multiple media codec like **acc**,\*
10-
\*amr**,**opus\*\* over different quality. The app can continue its recording in the background, so you
8+
A fully functioned recorder app with an ability to record over multiple media codec like **acc**,*
9+
*amr**,**opus** over different quality. The app can continue its recording in the background, so you
1110
never miss a moment. Once the recording, you can easily manage your files within the app.
1211
There `built-in player`, you can listen to your recordings directly within the app or use the
1312
convenient media notification for playback control.
@@ -77,31 +76,17 @@ playing stuff.
7776

7877
## :new: What's new
7978

80-
This update introduces a **built-in Audio Editor** alongside significant enhancements to the player:
81-
82-
- **✂️ Unleash Your Inner Editor:** Now you can precisely `trim` and `cut` your recordings directly
83-
within the app! Remove unwanted sections and refine your audio effortlessly.
84-
- 💾 **Save Your Edits:** Preserve your edited masterpieces! The app now allows you to **save the
85-
modified audio files** to your device's storage.
86-
- ⏯️ **Dedicated Editor Player:** A **secondary player** is integrated within the editor, providing
87-
you with focused playback control during the editing process, with undo and redo options to
88-
reapply your edits.
89-
- 🚀 **Under the Hood Improvements:** Fix issues with visualization via `new-visualizer` logic. A new
90-
speed selected UI is added to the player and others.
91-
92-
This update is all about giving you more control over your recordings, from capture to refinement.
79+
The latest update to the **RecorderApp** contains a new onboarding screen added with some settings
80+
route improvements
9381

9482
## :next_track_button: What's next
9583

96-
For the time being, RecorderApp encompasses all initially planned features and is considered
97-
complete. Future releases are not currently scheduled.
84+
For the time being, RecorderApp encompasses all initially planned features and is
85+
considered complete. Future releases are not currently scheduled.
9886

9987
If you have any new ideas or suggestions for enhancements, we encourage you to create a
10088
new [Issue](https://github.com/tuuhin/RecorderApp/issues) on GitHub.
10189

102-
We are considering potential additions to the audio editor, such as audio processors like `db-gain`
103-
and `low-pass-filter`.
104-
10590
## :hammer_and_wrench: Getting Started
10691

10792
Here are the steps to get started with this app:

app/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ android {
1616
applicationId = "com.eva.recorderapp"
1717
minSdk = libs.versions.minSdk.get().toInt()
1818
targetSdk = libs.versions.compileSdk.get().toInt()
19-
versionCode = 9
20-
versionName = "1.3.1"
19+
versionCode = 10
20+
versionName = "1.4.0"
2121

2222
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2323
vectorDrawables {
@@ -105,5 +105,6 @@ dependencies {
105105
implementation(project(":feature:editor"))
106106
implementation(project(":feature:settings"))
107107
implementation(project(":feature:widget"))
108+
implementation(project(":feature:onboarding"))
108109

109110
}

app/src/main/AndroidManifest.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
tools:targetApi="33">
1818

1919
<activity
20-
android:name=".MainActivity"
20+
android:name="com.eva.feature_onboarding.OnBoardingActivity"
2121
android:exported="true"
2222
android:launchMode="singleTop"
2323
android:theme="@style/Theme.App.Starting"
@@ -27,6 +27,16 @@
2727
<action android:name="android.intent.action.MAIN" />
2828
<category android:name="android.intent.category.LAUNCHER" />
2929
</intent-filter>
30+
31+
</activity>
32+
33+
<activity
34+
android:name=".MainActivity"
35+
android:exported="true"
36+
android:launchMode="singleTop"
37+
android:theme="@style/Theme.App.Starting"
38+
android:windowSoftInputMode="adjustResize">
39+
3040
<!-- For app deep-links-->
3141
<intent-filter>
3242
<action android:name="android.intent.action.VIEW" />
@@ -57,7 +67,7 @@
5767
</application>
5868

5969
<queries>
60-
<intent >
70+
<intent>
6171
<action android:name="android.speech.RecognitionService" />
6272
</intent>
6373
</queries>
Lines changed: 22 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
package com.eva.recorderapp
22

3-
import android.animation.AnimatorSet
4-
import android.animation.ObjectAnimator
53
import android.content.Intent
4+
import android.os.Build
65
import android.os.Bundle
7-
import android.view.View
8-
import android.view.animation.AccelerateDecelerateInterpolator
9-
import android.view.animation.AccelerateInterpolator
10-
import android.view.animation.DecelerateInterpolator
6+
import android.view.Window
117
import androidx.activity.ComponentActivity
128
import androidx.activity.compose.setContent
139
import androidx.activity.enableEdgeToEdge
1410
import androidx.compose.material3.MaterialTheme
1511
import androidx.compose.material3.Surface
16-
import androidx.core.animation.doOnEnd
17-
import androidx.core.animation.doOnStart
18-
import androidx.core.splashscreen.SplashScreen
1912
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
2013
import androidx.navigation.NavHostController
2114
import com.eva.recorderapp.navigation.AppNavHost
15+
import com.eva.ui.R
2216
import com.eva.ui.theme.RecorderAppTheme
2317
import dagger.hilt.android.AndroidEntryPoint
2418

@@ -28,16 +22,15 @@ class MainActivity : ComponentActivity() {
2822
private var navController: NavHostController? = null
2923

3024
override fun onCreate(savedInstanceState: Bundle?) {
31-
32-
val splash = installSplashScreen()
25+
// splash needs to be initiated here
26+
installSplashScreen()
3327

3428
super.onCreate(savedInstanceState)
3529

3630
// set enable edge to edge normally
3731
enableEdgeToEdge()
38-
// on splash complete again enable edge to edge
39-
splash.animateOnExit(onAnimationEnd = { enableEdgeToEdge() })
40-
32+
// set activity transitions
33+
setTransitions()
4134

4235
setContent {
4336
RecorderAppTheme {
@@ -56,74 +49,23 @@ class MainActivity : ComponentActivity() {
5649
super.onNewIntent(intent)
5750
navController?.handleDeepLink(intent)
5851
}
59-
}
60-
61-
private fun SplashScreen.animateOnExit(
62-
onAnimationStart: () -> Unit = {},
63-
onAnimationEnd: () -> Unit = {}
64-
) {
65-
val screenViewDuration = 200L
66-
67-
setOnExitAnimationListener { screenView ->
68-
// do all the animation is a reverse way
69-
val interpolator = AccelerateDecelerateInterpolator()
70-
71-
val iconScaleXAnimation = ObjectAnimator
72-
.ofFloat(screenView.iconView, View.SCALE_X, 1f, 0.5f)
73-
.apply {
74-
this.interpolator = interpolator
75-
this.duration = screenView.iconAnimationDurationMillis
76-
}
77-
78-
val iconScaleYAnimation = ObjectAnimator
79-
.ofFloat(screenView.iconView, View.SCALE_Y, 1f, 0.5f)
80-
.apply {
81-
this.interpolator = interpolator
82-
this.duration = screenView.iconAnimationDurationMillis
83-
}
84-
85-
val iconTranslateYAnimation = ObjectAnimator
86-
.ofFloat(screenView.iconView, View.TRANSLATION_Y, 0.0f, 20.0f)
87-
.apply {
88-
this.interpolator = interpolator
89-
this.duration = screenView.iconAnimationDurationMillis
90-
}
9152

92-
val viewFadeAnimation = ObjectAnimator
93-
.ofFloat(screenView.view, View.ALPHA, 1.0f, .2f)
94-
.apply {
95-
this.interpolator = DecelerateInterpolator()
96-
this.duration = screenViewDuration
97-
}
98-
99-
val viewTranslateAnimation = ObjectAnimator.ofFloat(
100-
screenView.view,
101-
View.TRANSLATION_Y,
102-
0f,
103-
screenView.view.height.toFloat()
104-
).apply {
105-
this.interpolator = AccelerateInterpolator()
106-
this.duration = screenViewDuration
107-
}
108-
109-
val viewAnimatorSet = AnimatorSet().apply {
110-
playTogether(viewFadeAnimation, viewTranslateAnimation)
111-
doOnEnd {
112-
screenView.remove()
113-
onAnimationEnd()
114-
}
115-
}
116-
117-
val iconAnimatorSet = AnimatorSet().apply {
118-
playTogether(
119-
iconScaleXAnimation,
120-
iconScaleYAnimation,
121-
iconTranslateYAnimation
53+
@Suppress("DEPRECATION")
54+
private fun setTransitions() {
55+
// allow activity transitions
56+
window.requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)
57+
// set transitions
58+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
59+
overrideActivityTransition(
60+
OVERRIDE_TRANSITION_OPEN,
61+
R.anim.activity_enter_transition,
62+
R.anim.activity_exit_transition
63+
)
64+
} else {
65+
overridePendingTransition(
66+
R.anim.activity_enter_transition,
67+
R.anim.activity_exit_transition
12268
)
123-
doOnEnd { viewAnimatorSet.start() }
124-
doOnStart { onAnimationStart() }
125-
12669
}
127-
iconAnimatorSet.start()
12870
}
12971
}

app/src/main/java/com/eva/recorderapp/navigation/routes/AppInfoDialog.kt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ import androidx.compose.foundation.layout.Column
1111
import androidx.compose.foundation.layout.ExperimentalLayoutApi
1212
import androidx.compose.foundation.layout.FlowRow
1313
import androidx.compose.foundation.layout.Row
14+
import androidx.compose.foundation.layout.Spacer
15+
import androidx.compose.foundation.layout.height
1416
import androidx.compose.foundation.layout.padding
1517
import androidx.compose.foundation.layout.size
1618
import androidx.compose.foundation.layout.sizeIn
19+
import androidx.compose.material.icons.Icons
20+
import androidx.compose.material.icons.filled.Code
21+
import androidx.compose.material.icons.filled.Draw
1722
import androidx.compose.material3.AlertDialogDefaults
1823
import androidx.compose.material3.Badge
1924
import androidx.compose.material3.Icon
@@ -40,6 +45,7 @@ import androidx.navigation.compose.dialog
4045
import com.eva.recorderapp.BuildConfig
4146
import com.eva.ui.R
4247
import com.eva.ui.navigation.NavDialogs
48+
import com.eva.ui.theme.DownloadableFonts
4349
import com.eva.ui.theme.RecorderAppTheme
4450
import com.eva.utils.ApplicationInfo
4551

@@ -79,7 +85,7 @@ private fun AppDialogInfoContent(
7985
Icon(
8086
painter = painterResource(id = R.drawable.ic_launcher_foreground),
8187
contentDescription = stringResource(R.string.app_name),
82-
modifier = Modifier.size(56.dp),
88+
modifier = Modifier.size(64.dp),
8389
tint = iconColor
8490
)
8591
Text(
@@ -102,12 +108,14 @@ private fun AppDialogInfoContent(
102108
Text(
103109
text = BuildConfig.VERSION_NAME,
104110
style = MaterialTheme.typography.labelMedium,
111+
fontFamily = DownloadableFonts.PLUS_CODE_LATIN_FONT_FAMILY,
105112
modifier = Modifier.padding(vertical = 2.dp, horizontal = 4.dp)
106113
)
107114
}
108115
}
116+
Spacer(modifier = Modifier.height(8.dp))
109117
FlowRow(
110-
horizontalArrangement = Arrangement.spacedBy(12.dp),
118+
horizontalArrangement = Arrangement.spacedBy(16.dp),
111119
verticalArrangement = Arrangement.Center,
112120
modifier = Modifier.align(Alignment.CenterHorizontally),
113121
) {
@@ -119,7 +127,7 @@ private fun AppDialogInfoContent(
119127
shape = MaterialTheme.shapes.large,
120128
icon = {
121129
Icon(
122-
painter = painterResource(id = R.drawable.ic_code),
130+
imageVector = Icons.Default.Code,
123131
contentDescription = stringResource(id = R.string.app_info_source_code)
124132
)
125133
},
@@ -136,7 +144,7 @@ private fun AppDialogInfoContent(
136144
shape = MaterialTheme.shapes.large,
137145
icon = {
138146
Icon(
139-
painter = painterResource(id = R.drawable.ic_author),
147+
imageVector = Icons.Default.Draw,
140148
contentDescription = stringResource(id = R.string.app_info_author)
141149
)
142150
},

app/src/main/res/values-v31/themes.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

core/ui/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies {
1717
// navigation
1818
implementation(libs.androidx.navigation.compose)
1919
implementation(libs.kotlinx.serialization.json)
20+
implementation(libs.androidx.core.splashscreen)
2021

2122
// hilt viewmodel
2223
implementation(libs.androidx.hilt.navigation.compose)

core/ui/src/main/java/com/eva/ui/theme/Fonts.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ private val provider = GoogleFont.Provider(
1515
private val PLUS_CODE_LATIN = GoogleFont("M PLUS Code Latin")
1616
private val NOVA_MONO = GoogleFont("Nova Mono")
1717
private val SPLINE_SANS_MONO = GoogleFont("Spline Sans Mono")
18+
private val FIRA_SANS = GoogleFont("Fira Sans")
1819

1920
object DownloadableFonts {
2021
val PLUS_CODE_LATIN_FONT_FAMILY = FontFamily(
@@ -39,5 +40,13 @@ object DownloadableFonts {
3940
weight = FontWeight.Medium
4041
)
4142
)
43+
44+
val FIRA_SANS_FONT_FAMILY = FontFamily(
45+
Font(
46+
googleFont = FIRA_SANS,
47+
fontProvider = provider,
48+
weight = FontWeight.Medium
49+
)
50+
)
4251
}
4352

0 commit comments

Comments
 (0)