Skip to content

Commit

Permalink
- Add changelogs for version code 47
Browse files Browse the repository at this point in the history
- Update libs
- Minor cleaning
  • Loading branch information
thetwom committed Feb 7, 2022
1 parent e6e1431 commit 0d27719
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 25 deletions.
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "de.moekadu.metronome"
minSdkVersion 23
targetSdkVersion 31
versionCode 46
versionName "4.3.2"
versionCode 47
versionName "4.4.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand All @@ -32,15 +32,15 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.activity:activity-ktx:1.4.0'
implementation 'androidx.fragment:fragment-ktx:1.4.0'
implementation 'com.google.android.material:material:1.6.0-alpha01'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2-native-mt'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.fragment:fragment-ktx:1.4.1'
implementation 'com.google.android.material:material:1.6.0-alpha02'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.media:media:1.4.3'
implementation 'androidx.dynamicanimation:dynamicanimation:1.1.0-alpha03'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.0'
implementation 'androidx.lifecycle:lifecycle-service:2.4.0'
implementation "androidx.recyclerview:recyclerview:1.2.1"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
android:fullBackupContent="@xml/backup_descriptor">
<activity
android:name="de.moekadu.metronome.MainActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:windowSoftInputMode="adjustPan"
android:theme="@style/AppTheme"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import androidx.transition.AutoTransition
import androidx.transition.TransitionManager

class DummyViewGroupWithTransition(context : Context, attrs : AttributeSet?, defStyleAttr : Int)
: ViewGroup(context, attrs, defStyleAttr) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/de/moekadu/metronome/NoteView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ open class NoteView(context : Context, attrs : AttributeSet?, defStyleAttr : Int
transition.duration = animationDuration
TransitionManager.beginDelayedTransition(this@NoteView, transition)
}
val map = notes.map {it.uid to it}.toMap().toMutableMap()
val map = notes.associateBy { it.uid }.toMutableMap()
notes.clear()
for (note in noteList) {
val n = map.remove(note.uid)
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/de/moekadu/metronome/ScenesAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package de.moekadu.metronome

import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/de/moekadu/metronome/ScenesViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package de.moekadu.metronome

import android.net.Uri
import android.util.Log
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/de/moekadu/metronome/SettingsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SettingsFragment: PreferenceFragmentCompat() {
menu.clear() // this should not be needed, but just a "setHasOptionsMenu(false)" in "onCreate" be enough, but this doesnt work
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {

val vibratePreference = findPreference("vibrate") as SwitchPreferenceCompat?
require(vibratePreference != null)
Expand Down Expand Up @@ -126,7 +126,7 @@ class SettingsFragment: PreferenceFragmentCompat() {
if(minimumBpm.text == null)
minimumBpm.text = InitialValues.minimumBpm.toString()

minimumBpm.summary = getString(R.string.bpm, Utilities.getBpmString(minimumBpm.text.toFloat(), bpmIncrementValue))
minimumBpm.summary = getString(R.string.bpm, Utilities.getBpmString(minimumBpm.text!!.toFloat(), bpmIncrementValue))
minimumBpm.setOnBindEditTextListener(EditTextPreference.OnBindEditTextListener { editText ->
editText.inputType = InputType.TYPE_CLASS_NUMBER
})
Expand All @@ -136,14 +136,14 @@ class SettingsFragment: PreferenceFragmentCompat() {
if(maximumBpm.text == null)
maximumBpm.text = InitialValues.maximumBpm.toString()

maximumBpm.summary = getString(R.string.bpm, Utilities.getBpmString(maximumBpm.text.toFloat(), bpmIncrementValue))
maximumBpm.summary = getString(R.string.bpm, Utilities.getBpmString(maximumBpm.text!!.toFloat(), bpmIncrementValue))
maximumBpm.setOnBindEditTextListener(EditTextPreference.OnBindEditTextListener { editText ->
editText.inputType = InputType.TYPE_CLASS_NUMBER
})

minimumBpm.setOnPreferenceChangeListener { _, newValue ->
val bpm = (newValue as String).toFloat()
val maxBpm = maximumBpm.text.toFloat()
val maxBpm = maximumBpm.text!!.toFloat()
if (bpm < maxBpm) {
minimumBpm.summary = getString(R.string.bpm, Utilities.getBpmString(bpm))
true
Expand All @@ -157,7 +157,7 @@ class SettingsFragment: PreferenceFragmentCompat() {

maximumBpm.setOnPreferenceChangeListener { _, newValue ->
val bpm = (newValue as String).toFloat()
val minBpm = minimumBpm.text.toFloat()
val minBpm = minimumBpm.text!!.toFloat()
if (bpm > minBpm && bpm <= ABSOLUTE_MAXIMUM_SPEED) {
maximumBpm.summary = getString(R.string.bpm, Utilities.getBpmString(bpm))
true
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/de/moekadu/metronome/SoundChooser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import android.graphics.Rect
import android.os.Bundle
import android.os.Parcelable
import android.util.AttributeSet
import android.util.Log
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -1151,7 +1150,7 @@ class SoundChooser(context : Context, attrs : AttributeSet?, defStyleAttr: Int)
target.set(source)
}
} else { // reorder renew, ... control button list
val map = controlButtons.map { it.uid to it }.toMap().toMutableMap()
val map = controlButtons.associateBy { it.uid }.toMutableMap()
controlButtons.clear()
for (note in noteList) {
val n = map.remove(note.uid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ package de.moekadu.metronome
import android.annotation.SuppressLint
import android.content.Context
import android.content.res.ColorStateList
import android.util.Log

@SuppressLint("ViewConstructor")
class SoundChooserControlButton(
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.5.31'
ext.kotlin_version = '1.6.10'

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"


Expand Down
6 changes: 6 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/47.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
v4.3.2:
- Fix issue that active editing note was sometime not shows
- Update dependencies

v4.4.0:
- Add translation for Simplified Chinese (thanks to "HZ is not Chatty")
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip

0 comments on commit 0d27719

Please sign in to comment.