mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-06-05 21:59:31 +02:00
updating commons and target SDK to 31
This commit is contained in:
@@ -9,12 +9,12 @@ if (keystorePropertiesFile.exists()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 31
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.simplemobiletools.voicerecorder"
|
applicationId "com.simplemobiletools.voicerecorder"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 31
|
||||||
versionCode 19
|
versionCode 19
|
||||||
versionName "5.6.5"
|
versionName "5.6.5"
|
||||||
setProperty("archivesBaseName", "voice-recorder")
|
setProperty("archivesBaseName", "voice-recorder")
|
||||||
@@ -62,7 +62,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:99c8b8c007'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:e3376e4f56'
|
||||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||||
implementation 'com.github.Armen101:AudioRecordView:1.0.4'
|
implementation 'com.github.Armen101:AudioRecordView:1.0.4'
|
||||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
<application
|
<application
|
||||||
android:name=".App"
|
android:name=".App"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
android:appCategory="audio"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_launcher_name"
|
android:label="@string/app_launcher_name"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
@@ -31,6 +32,7 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.WidgetRecordDisplayConfigureActivity"
|
android:name=".activities.WidgetRecordDisplayConfigureActivity"
|
||||||
|
android:exported="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/MyWidgetConfigTheme">
|
android:theme="@style/MyWidgetConfigTheme">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -40,6 +42,7 @@
|
|||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".helpers.MyWidgetRecordDisplayProvider"
|
android:name=".helpers.MyWidgetRecordDisplayProvider"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@drawable/ic_microphone_vector">
|
android:icon="@drawable/ic_microphone_vector">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
@@ -52,21 +55,25 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.BackgroundRecordActivity"
|
android:name=".activities.BackgroundRecordActivity"
|
||||||
|
android:exported="false"
|
||||||
android:theme="@android:style/Theme.NoDisplay" />
|
android:theme="@android:style/Theme.NoDisplay" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.SplashActivity"
|
android:name=".activities.SplashActivity"
|
||||||
|
android:exported="false"
|
||||||
android:theme="@style/SplashTheme" />
|
android:theme="@style/SplashTheme" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
|
android:exported="false"
|
||||||
android:launchMode="singleTask" />
|
android:launchMode="singleTask" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.SettingsActivity"
|
android:name=".activities.SettingsActivity"
|
||||||
|
android:exported="false"
|
||||||
android:label="@string/settings"
|
android:label="@string/settings"
|
||||||
android:parentActivityName=".activities.MainActivity" >
|
android:parentActivityName=".activities.MainActivity">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
|
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
|
||||||
@@ -76,11 +83,13 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.simplemobiletools.commons.activities.AboutActivity"
|
android:name="com.simplemobiletools.commons.activities.AboutActivity"
|
||||||
|
android:exported="false"
|
||||||
android:label="@string/about"
|
android:label="@string/about"
|
||||||
android:parentActivityName=".activities.MainActivity" />
|
android:parentActivityName=".activities.MainActivity" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
|
android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
|
||||||
|
android:exported="false"
|
||||||
android:label="@string/customize_colors"
|
android:label="@string/customize_colors"
|
||||||
android:parentActivityName=".activities.SettingsActivity" />
|
android:parentActivityName=".activities.SettingsActivity" />
|
||||||
|
|
||||||
@@ -97,6 +106,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Red"
|
android:name=".activities.SplashActivity.Red"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_red"
|
android:icon="@mipmap/ic_launcher_red"
|
||||||
android:roundIcon="@mipmap/ic_launcher_red"
|
android:roundIcon="@mipmap/ic_launcher_red"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -110,6 +120,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Pink"
|
android:name=".activities.SplashActivity.Pink"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_pink"
|
android:icon="@mipmap/ic_launcher_pink"
|
||||||
android:roundIcon="@mipmap/ic_launcher_pink"
|
android:roundIcon="@mipmap/ic_launcher_pink"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -123,6 +134,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Purple"
|
android:name=".activities.SplashActivity.Purple"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_purple"
|
android:icon="@mipmap/ic_launcher_purple"
|
||||||
android:roundIcon="@mipmap/ic_launcher_purple"
|
android:roundIcon="@mipmap/ic_launcher_purple"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -136,6 +148,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Deep_purple"
|
android:name=".activities.SplashActivity.Deep_purple"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_deep_purple"
|
android:icon="@mipmap/ic_launcher_deep_purple"
|
||||||
android:roundIcon="@mipmap/ic_launcher_deep_purple"
|
android:roundIcon="@mipmap/ic_launcher_deep_purple"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -149,6 +162,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Indigo"
|
android:name=".activities.SplashActivity.Indigo"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_indigo"
|
android:icon="@mipmap/ic_launcher_indigo"
|
||||||
android:roundIcon="@mipmap/ic_launcher_indigo"
|
android:roundIcon="@mipmap/ic_launcher_indigo"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -162,6 +176,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Blue"
|
android:name=".activities.SplashActivity.Blue"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_blue"
|
android:icon="@mipmap/ic_launcher_blue"
|
||||||
android:roundIcon="@mipmap/ic_launcher_blue"
|
android:roundIcon="@mipmap/ic_launcher_blue"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -175,6 +190,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Light_blue"
|
android:name=".activities.SplashActivity.Light_blue"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_light_blue"
|
android:icon="@mipmap/ic_launcher_light_blue"
|
||||||
android:roundIcon="@mipmap/ic_launcher_light_blue"
|
android:roundIcon="@mipmap/ic_launcher_light_blue"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -188,6 +204,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Cyan"
|
android:name=".activities.SplashActivity.Cyan"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_cyan"
|
android:icon="@mipmap/ic_launcher_cyan"
|
||||||
android:roundIcon="@mipmap/ic_launcher_cyan"
|
android:roundIcon="@mipmap/ic_launcher_cyan"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -201,6 +218,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Teal"
|
android:name=".activities.SplashActivity.Teal"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_teal"
|
android:icon="@mipmap/ic_launcher_teal"
|
||||||
android:roundIcon="@mipmap/ic_launcher_teal"
|
android:roundIcon="@mipmap/ic_launcher_teal"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -214,6 +232,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Green"
|
android:name=".activities.SplashActivity.Green"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_green"
|
android:icon="@mipmap/ic_launcher_green"
|
||||||
android:roundIcon="@mipmap/ic_launcher_green"
|
android:roundIcon="@mipmap/ic_launcher_green"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -227,6 +246,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Light_green"
|
android:name=".activities.SplashActivity.Light_green"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_light_green"
|
android:icon="@mipmap/ic_launcher_light_green"
|
||||||
android:roundIcon="@mipmap/ic_launcher_light_green"
|
android:roundIcon="@mipmap/ic_launcher_light_green"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -240,6 +260,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Lime"
|
android:name=".activities.SplashActivity.Lime"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_lime"
|
android:icon="@mipmap/ic_launcher_lime"
|
||||||
android:roundIcon="@mipmap/ic_launcher_lime"
|
android:roundIcon="@mipmap/ic_launcher_lime"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -253,6 +274,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Yellow"
|
android:name=".activities.SplashActivity.Yellow"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_yellow"
|
android:icon="@mipmap/ic_launcher_yellow"
|
||||||
android:roundIcon="@mipmap/ic_launcher_yellow"
|
android:roundIcon="@mipmap/ic_launcher_yellow"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -266,6 +288,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Amber"
|
android:name=".activities.SplashActivity.Amber"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_amber"
|
android:icon="@mipmap/ic_launcher_amber"
|
||||||
android:roundIcon="@mipmap/ic_launcher_amber"
|
android:roundIcon="@mipmap/ic_launcher_amber"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -279,6 +302,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Orange"
|
android:name=".activities.SplashActivity.Orange"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher"
|
android:roundIcon="@mipmap/ic_launcher"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -291,6 +315,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Deep_orange"
|
android:name=".activities.SplashActivity.Deep_orange"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_deep_orange"
|
android:icon="@mipmap/ic_launcher_deep_orange"
|
||||||
android:roundIcon="@mipmap/ic_launcher_deep_orange"
|
android:roundIcon="@mipmap/ic_launcher_deep_orange"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -304,6 +329,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Brown"
|
android:name=".activities.SplashActivity.Brown"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_brown"
|
android:icon="@mipmap/ic_launcher_brown"
|
||||||
android:roundIcon="@mipmap/ic_launcher_brown"
|
android:roundIcon="@mipmap/ic_launcher_brown"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -317,6 +343,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Blue_grey"
|
android:name=".activities.SplashActivity.Blue_grey"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_blue_grey"
|
android:icon="@mipmap/ic_launcher_blue_grey"
|
||||||
android:roundIcon="@mipmap/ic_launcher_blue_grey"
|
android:roundIcon="@mipmap/ic_launcher_blue_grey"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -330,6 +357,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activities.SplashActivity.Grey_black"
|
android:name=".activities.SplashActivity.Grey_black"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
|
android:exported="true"
|
||||||
android:icon="@mipmap/ic_launcher_grey_black"
|
android:icon="@mipmap/ic_launcher_grey_black"
|
||||||
android:roundIcon="@mipmap/ic_launcher_grey_black"
|
android:roundIcon="@mipmap/ic_launcher_grey_black"
|
||||||
android:targetActivity=".activities.SplashActivity">
|
android:targetActivity=".activities.SplashActivity">
|
||||||
@@ -339,6 +367,5 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity-alias>
|
</activity-alias>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@@ -105,11 +105,11 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
main_tabs_holder.onTabSelectionChanged(
|
main_tabs_holder.onTabSelectionChanged(
|
||||||
tabUnselectedAction = {
|
tabUnselectedAction = {
|
||||||
it.icon?.applyColorFilter(config.textColor)
|
it.icon?.applyColorFilter(getProperTextColor())
|
||||||
},
|
},
|
||||||
tabSelectedAction = {
|
tabSelectedAction = {
|
||||||
view_pager.currentItem = it.position
|
view_pager.currentItem = it.position
|
||||||
it.icon?.applyColorFilter(getAdjustedPrimaryColor())
|
it.icon?.applyColorFilter(getProperPrimaryColor())
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -118,10 +118,10 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun setupTabColors() {
|
private fun setupTabColors() {
|
||||||
main_tabs_holder.apply {
|
main_tabs_holder.apply {
|
||||||
background = ColorDrawable(config.backgroundColor)
|
background = ColorDrawable(getProperBackgroundColor())
|
||||||
setSelectedTabIndicatorColor(getAdjustedPrimaryColor())
|
setSelectedTabIndicatorColor(getProperPrimaryColor())
|
||||||
getTabAt(view_pager.currentItem)?.icon?.applyColorFilter(getAdjustedPrimaryColor())
|
getTabAt(view_pager.currentItem)?.icon?.applyColorFilter(getProperPrimaryColor())
|
||||||
getTabAt(getInactiveTabIndex())?.icon?.applyColorFilter(config.textColor)
|
getTabAt(getInactiveTabIndex())?.icon?.applyColorFilter(getProperTextColor())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,11 +36,11 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
updateTextColors(settings_scrollview)
|
updateTextColors(settings_scrollview)
|
||||||
|
|
||||||
arrayOf(settings_color_customization_label, settings_general_settings_label).forEach {
|
arrayOf(settings_color_customization_label, settings_general_settings_label).forEach {
|
||||||
it.setTextColor(getAdjustedPrimaryColor())
|
it.setTextColor(getProperPrimaryColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
arrayOf(settings_color_customization_holder, settings_general_settings_holder).forEach {
|
arrayOf(settings_color_customization_holder, settings_general_settings_holder).forEach {
|
||||||
it.background.applyColorFilter(baseConfig.backgroundColor.getContrastColor())
|
it.background.applyColorFilter(getProperBackgroundColor().getContrastColor())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -200,7 +200,7 @@ class RecordingsAdapter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (recording.id == currRecordingId) {
|
if (recording.id == currRecordingId) {
|
||||||
recording_title.setTextColor(context.getAdjustedPrimaryColor())
|
recording_title.setTextColor(context.getProperPrimaryColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
recording_title.text = recording.title
|
recording_title.text = recording.title
|
||||||
|
@@ -29,7 +29,6 @@ import org.greenrobot.eventbus.Subscribe
|
|||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.ArrayList
|
|
||||||
|
|
||||||
class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet), RefreshRecordingsListener {
|
class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPagerFragment(context, attributeSet), RefreshRecordingsListener {
|
||||||
private val FAST_FORWARD_SKIP_MS = 10000
|
private val FAST_FORWARD_SKIP_MS = 10000
|
||||||
@@ -46,7 +45,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
|||||||
if (prevSavePath.isNotEmpty() && context!!.config.saveRecordingsFolder != prevSavePath) {
|
if (prevSavePath.isNotEmpty() && context!!.config.saveRecordingsFolder != prevSavePath) {
|
||||||
setupAdapter()
|
setupAdapter()
|
||||||
} else {
|
} else {
|
||||||
getRecordingsAdapter()?.updateTextColor(context.config.textColor)
|
getRecordingsAdapter()?.updateTextColor(context.getProperTextColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
storePrevPath()
|
storePrevPath()
|
||||||
@@ -366,7 +365,7 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
|||||||
|
|
||||||
private fun getToggleButtonIcon(isPlaying: Boolean): Drawable {
|
private fun getToggleButtonIcon(isPlaying: Boolean): Drawable {
|
||||||
val drawable = if (isPlaying) R.drawable.ic_pause_vector else R.drawable.ic_play_vector
|
val drawable = if (isPlaying) R.drawable.ic_pause_vector else R.drawable.ic_play_vector
|
||||||
return resources.getColoredDrawableWithColor(drawable, context.getAdjustedPrimaryColor().getContrastColor())
|
return resources.getColoredDrawableWithColor(drawable, context.getProperPrimaryColor().getContrastColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun skip(forward: Boolean) {
|
private fun skip(forward: Boolean) {
|
||||||
@@ -393,16 +392,16 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupColors() {
|
private fun setupColors() {
|
||||||
val adjustedPrimaryColor = context.getAdjustedPrimaryColor()
|
val properPrimaryColor = context.getProperPrimaryColor()
|
||||||
recordings_fastscroller.updateColors(adjustedPrimaryColor)
|
recordings_fastscroller.updateColors(properPrimaryColor)
|
||||||
context.updateTextColors(player_holder)
|
context.updateTextColors(player_holder)
|
||||||
|
|
||||||
val textColor = context.config.textColor
|
val textColor = context.getProperTextColor()
|
||||||
arrayListOf(previous_btn, next_btn).forEach {
|
arrayListOf(previous_btn, next_btn).forEach {
|
||||||
it.applyColorFilter(textColor)
|
it.applyColorFilter(textColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
play_pause_btn.background.applyColorFilter(adjustedPrimaryColor)
|
play_pause_btn.background.applyColorFilter(properPrimaryColor)
|
||||||
play_pause_btn.setImageDrawable(getToggleButtonIcon(false))
|
play_pause_btn.setImageDrawable(getToggleButtonIcon(false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,7 +9,6 @@ import android.util.AttributeSet
|
|||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.isNougatPlus
|
import com.simplemobiletools.commons.helpers.isNougatPlus
|
||||||
import com.simplemobiletools.voicerecorder.R
|
import com.simplemobiletools.voicerecorder.R
|
||||||
import com.simplemobiletools.voicerecorder.extensions.config
|
|
||||||
import com.simplemobiletools.voicerecorder.helpers.*
|
import com.simplemobiletools.voicerecorder.helpers.*
|
||||||
import com.simplemobiletools.voicerecorder.models.Events
|
import com.simplemobiletools.voicerecorder.models.Events
|
||||||
import com.simplemobiletools.voicerecorder.services.RecorderService
|
import com.simplemobiletools.voicerecorder.services.RecorderService
|
||||||
@@ -64,19 +63,19 @@ class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupColors() {
|
private fun setupColors() {
|
||||||
val adjustedPrimaryColor = context.getAdjustedPrimaryColor()
|
val properPrimaryColor = context.getProperPrimaryColor()
|
||||||
toggle_recording_button.apply {
|
toggle_recording_button.apply {
|
||||||
setImageDrawable(getToggleButtonIcon())
|
setImageDrawable(getToggleButtonIcon())
|
||||||
background.applyColorFilter(adjustedPrimaryColor)
|
background.applyColorFilter(properPrimaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle_pause_button.apply {
|
toggle_pause_button.apply {
|
||||||
setImageDrawable(resources.getColoredDrawableWithColor(R.drawable.ic_pause_vector, adjustedPrimaryColor.getContrastColor()))
|
setImageDrawable(resources.getColoredDrawableWithColor(R.drawable.ic_pause_vector, properPrimaryColor.getContrastColor()))
|
||||||
background.applyColorFilter(adjustedPrimaryColor)
|
background.applyColorFilter(properPrimaryColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
recorder_visualizer.chunkColor = adjustedPrimaryColor
|
recorder_visualizer.chunkColor = properPrimaryColor
|
||||||
recording_duration.setTextColor(context.config.textColor)
|
recording_duration.setTextColor(context.getProperTextColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateRecordingDuration(duration: Int) {
|
private fun updateRecordingDuration(duration: Int) {
|
||||||
@@ -85,7 +84,7 @@ class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
|
|||||||
|
|
||||||
private fun getToggleButtonIcon(): Drawable {
|
private fun getToggleButtonIcon(): Drawable {
|
||||||
val drawable = if (status == RECORDING_RUNNING || status == RECORDING_PAUSED) R.drawable.ic_stop_vector else R.drawable.ic_microphone_vector
|
val drawable = if (status == RECORDING_RUNNING || status == RECORDING_PAUSED) R.drawable.ic_stop_vector else R.drawable.ic_microphone_vector
|
||||||
return resources.getColoredDrawableWithColor(drawable, context.getAdjustedPrimaryColor().getContrastColor())
|
return resources.getColoredDrawableWithColor(drawable, context.getProperPrimaryColor().getContrastColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleRecording() {
|
private fun toggleRecording() {
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:ignore="AppCompatResource">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_rename"
|
android:id="@+id/cab_rename"
|
||||||
android:icon="@drawable/ic_rename_vector"
|
android:icon="@drawable/ic_rename_vector"
|
||||||
@@ -13,11 +15,13 @@
|
|||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_open_with"
|
android:id="@+id/cab_open_with"
|
||||||
|
android:showAsAction="never"
|
||||||
android:title="@string/open_with"
|
android:title="@string/open_with"
|
||||||
app:showAsAction="never" />
|
app:showAsAction="never" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/cab_delete"
|
android:id="@+id/cab_delete"
|
||||||
android:icon="@drawable/ic_delete_vector"
|
android:icon="@drawable/ic_delete_vector"
|
||||||
|
android:showAsAction="never"
|
||||||
android:title="@string/delete"
|
android:title="@string/delete"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
</menu>
|
</menu>
|
||||||
|
@@ -8,7 +8,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.0.4'
|
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||||
|
Reference in New Issue
Block a user