Skip to content

Commit

Permalink
Merge pull request #281 from lucasnlm/update-strings
Browse files Browse the repository at this point in the history
Update strings
  • Loading branch information
lucasnlm authored May 22, 2021
2 parents 0da1326 + c445531 commit 564ebd6
Show file tree
Hide file tree
Showing 141 changed files with 374 additions and 633 deletions.
6 changes: 3 additions & 3 deletions about/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ dependencies {
implementation 'com.google.android.material:material:1.3.0'

// AndroidX
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.activity:activity-ktx:1.2.2'
implementation 'androidx.fragment:fragment-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.activity:activity-ktx:1.2.3'
implementation 'androidx.fragment:fragment-ktx:1.3.4'

// RecyclerView
implementation 'androidx.recyclerview:recyclerview:1.2.0'
Expand Down
43 changes: 21 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {

defaultConfig {
// versionCode and versionName must be hardcoded to support F-droid
versionCode 1001061
versionName '10.1.6'
versionCode 1003001
versionName '10.3.0'
minSdkVersion 21
targetSdkVersion 30
multiDexEnabled true
Expand Down Expand Up @@ -124,12 +124,12 @@ dependencies {
fossImplementation project(':foss')

// AndroidX
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.activity:activity-ktx:1.2.2'
implementation 'androidx.fragment:fragment-ktx:1.3.2'
implementation 'androidx.activity:activity-ktx:1.2.3'
implementation 'androidx.fragment:fragment-ktx:1.3.4'
implementation 'androidx.cardview:cardview:1.0.0'

// Lifecycle
Expand All @@ -139,7 +139,7 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1'

// Room
implementation 'androidx.room:room-ktx:2.2.6'
implementation 'androidx.room:room-ktx:2.3.0'

// Constraint
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
Expand All @@ -160,30 +160,29 @@ dependencies {
// Tests
testImplementation 'junit:junit:4.13.2'
testImplementation 'android.arch.core:core-testing:1.1.1'
testImplementation 'androidx.core:core-ktx:1.1.0'
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'androidx.test:core-ktx:1.2.0'
testImplementation 'androidx.test:rules:1.2.0'
testImplementation 'androidx.test:runner:1.2.0'
testImplementation 'androidx.core:core-ktx:1.5.0'
testImplementation 'androidx.test:core:1.3.0'
testImplementation 'androidx.test:core-ktx:1.3.0'
testImplementation 'androidx.test:rules:1.3.0'
testImplementation 'androidx.test:runner:1.3.0'
testImplementation 'androidx.test.espresso:espresso-core:3.3.0'
testImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
testImplementation 'androidx.fragment:fragment-testing:1.2.5'
testImplementation 'androidx.fragment:fragment-testing:1.3.4'
testImplementation 'org.robolectric:robolectric:4.3.1'
testImplementation 'androidx.test.ext:junit:1.1.2'
testImplementation 'io.mockk:mockk:1.10.0'
testImplementation 'io.mockk:mockk:1.11.0'

// Core library
androidTestImplementation 'androidx.test:core:1.2.0'
androidTestImplementation 'androidx.test:core:1.3.0'

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.core:core-ktx:1.1.0'
androidTestImplementation 'androidx.test:core:1.2.0'
androidTestImplementation 'androidx.test:core-ktx:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestUtil 'androidx.test:orchestrator:1.2.0'
androidTestImplementation 'androidx.test:core:1.3.0'
androidTestImplementation 'androidx.test:core-ktx:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestUtil 'androidx.test:orchestrator:1.3.0'
}

tasks.withType(Test) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class CloudSaveManagerImpl(
unlockedThemes = preferencesRepository.getUnlockedThemes().joinToString(" "),
squareDivider = preferencesRepository.squareDivider(),
doubleClickTimeout = preferencesRepository.getDoubleClickTimeout().toInt(),
allowTapNumbers = preferencesRepository.allowTapOnNumbers().toInt(),
)
}
} catch (e: Exception) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class MainViewModel(
setFlagAssistant(gameAssistance != 0)
setHapticFeedback(hapticFeedback != 0)
setHelp(help != 0)
setAllowTapOnNumbers(allowTapNumbers != 0)
setSoundEffectsEnabled(soundEffects != 0)
setPremiumFeatures(premiumFeatures != 0)
useControlStyle(ControlStyle.values()[controlStyle])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ class PreferencesActivity :
action = { preferenceRepository.setHelp(it) }
)

bindItem(
label = allowClickNumberLabel,
switch = clickOnNumbers,
supportTv = false,
checked = preferenceRepository.allowTapOnNumbers(),
action = { preferenceRepository.setAllowTapOnNumbers(it) }
)

PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this)
}
Expand Down
25 changes: 25 additions & 0 deletions app/src/main/res/layout/activity_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,31 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/helpLabel" />

<TextView
android:id="@+id/allowClickNumberLabel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:alpha="1.0"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingVertical="16dp"
android:text="@string/click_numbers"
android:textColor="?attr/colorOnBackground"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/helpLabel" />

<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/clickOnNumbers"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/allowClickNumberLabel"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/allowClickNumberLabel" />

</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,8 @@ class MockPreferencesRepository : IPreferencesRepository {
override fun showTutorialDialog(): Boolean = false

override fun setTutorialDialog(show: Boolean) { }

override fun allowTapOnNumbers(): Boolean = true

override fun setAllowTapOnNumbers(allow: Boolean) { }
}
22 changes: 11 additions & 11 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ dependencies {
implementation project(':gdx')

// AndroidX
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'androidx.activity:activity-ktx:1.2.2'
implementation "androidx.fragment:fragment-ktx:1.3.2"
implementation 'androidx.activity:activity-ktx:1.2.3'
implementation "androidx.fragment:fragment-ktx:1.3.3"

// Google
implementation 'com.google.android.material:material:1.3.0'
Expand All @@ -63,10 +63,10 @@ dependencies {
testImplementation 'org.koin:koin-test:2.2.1'

// Room
api 'androidx.room:room-runtime:2.2.5'
api 'androidx.room:room-ktx:2.2.5'
kapt 'androidx.room:room-compiler:2.2.5'
testImplementation 'androidx.room:room-testing:2.2.5'
api 'androidx.room:room-runtime:2.3.0'
api 'androidx.room:room-ktx:2.3.0'
kapt 'androidx.room:room-compiler:2.3.0'
testImplementation 'androidx.room:room-testing:2.3.0'

// Moshi - Json
api 'com.squareup.moshi:moshi:1.11.0'
Expand All @@ -88,12 +88,12 @@ dependencies {
testImplementation "io.mockk:mockk:1.10.3"

// Core library
androidTestImplementation 'androidx.test:core:1.2.0'
androidTestImplementation 'androidx.test:core:1.3.0'

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestUtil 'androidx.test:orchestrator:1.2.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestUtil 'androidx.test:orchestrator:1.3.0'
}

tasks.withType(Test) {
Expand Down
Loading

0 comments on commit 564ebd6

Please sign in to comment.