Skip to content

Commit

Permalink
Merge pull request #277 from lucasnlm/update-strings
Browse files Browse the repository at this point in the history
Update strings
  • Loading branch information
lucasnlm authored May 11, 2021
2 parents d58a1d7 + 449e847 commit 3524eab
Show file tree
Hide file tree
Showing 33 changed files with 215 additions and 197 deletions.
3 changes: 2 additions & 1 deletion about/src/main/res/layout/activity_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
android:paddingHorizontal="@dimen/main_activity_padding"
android:paddingVertical="16dp">

<TextView
android:id="@+id/textView"
Expand Down
2 changes: 1 addition & 1 deletion about/src/main/res/layout/fragment_about_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:paddingHorizontal="20dp"
android:paddingHorizontal="@dimen/main_activity_padding"
tools:context="dev.lucasnlm.antimine.about.AboutActivity">

<LinearLayout
Expand Down
4 changes: 2 additions & 2 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 1001041
versionName '10.1.4'
versionCode 1001051
versionName '10.1.5'
minSdkVersion 21
targetSdkVersion 30
multiDexEnabled true
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/dev/lucasnlm/antimine/GameActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import dev.lucasnlm.external.ReviewWrapper
import kotlinx.android.synthetic.main.activity_game.*
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -151,7 +152,7 @@ class GameActivity :
tapToBegin.visibility = View.GONE
}

if (it.turn < 3 && it.saveId == 0L) {
if (it.turn < 1 && it.saveId == 0L) {
val color = usingTheme.palette.covered.toAndroidColor(168)
val tint = ColorStateList.valueOf(color)
val controlText = gameViewModel.getControlDescription(applicationContext)
Expand Down Expand Up @@ -329,7 +330,7 @@ class GameActivity :
gameViewModel.pauseGame()
}

lifecycleScope.launch {
GlobalScope.launch {
gameViewModel.saveGame()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,13 @@ class StatsViewModel(
}

private fun List<Stats>.filterStandard(standardSize: Minefield) = filter {
it.width == standardSize.width && it.height == standardSize.height
(it.width == standardSize.width && it.height == standardSize.height) ||
(it.width == standardSize.height && it.height == standardSize.width)
}

private fun List<Stats>.filterNotStandard(standardSize: Minefield) = filterNot {
it.width == standardSize.width && it.height == standardSize.height
(it.width == standardSize.width && it.height == standardSize.height) ||
(it.width == standardSize.height && it.height == standardSize.width)
}
}
}
31 changes: 16 additions & 15 deletions app/src/main/res/layout-land/activity_game.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,34 @@
android:id="@+id/tapToBegin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/round_background"
android:clickable="false"
android:paddingHorizontal="12dp"
android:paddingVertical="8dp"
android:text="@string/tap_to_begin"
android:textStyle="bold"
android:textAllCaps="true"
android:background="@drawable/round_background"
android:paddingVertical="8dp"
android:paddingHorizontal="12dp"
app:layout_constraintStart_toStartOf="parent"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/controlsToast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:textStyle="bold"
android:textAllCaps="true"
android:layout_marginVertical="64dp"
android:paddingVertical="8dp"
android:paddingHorizontal="12dp"
android:background="@drawable/round_background"
tools:text="Action to Reaction"
android:clickable="false"
android:gravity="center_horizontal"
android:paddingHorizontal="12dp"
android:paddingVertical="8dp"
android:textAllCaps="true"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
tools:text="Action to Reaction" />

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
Expand Down Expand Up @@ -133,12 +134,12 @@
android:id="@+id/shortcutIcon"
android:layout_width="?attr/actionBarSize"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="center_horizontal"
android:alpha="0.0"
android:background="?selectableItemBackgroundBorderless"
android:clickable="false"
android:contentDescription="@string/new_game"
android:padding="14dp"
android:layout_gravity="center_horizontal"
app:srcCompat="@drawable/retry"
tools:alpha="1.0" />

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/activity_language.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:elevation="0.0dp"
android:paddingHorizontal="20dp"
android:paddingHorizontal="@dimen/main_activity_padding"
app:layout_constraintBottom_toTopOf="@+id/open_crowdin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@+id/open_crowdin"
app:layout_constraintTop_toBottomOf="@id/section" />

<dev.lucasnlm.antimine.ui.view.CardButtonView
android:id="@+id/open_crowdin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:layout_marginHorizontal="@dimen/main_activity_padding"
android:layout_marginVertical="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
android:layout_height="match_parent"
android:fitsSystemWindows="false"
android:animateLayoutChanges="true"
android:paddingHorizontal="16dp"
tools:context=".main.MainActivity">

<ScrollView
Expand All @@ -22,7 +23,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="32dp"
android:paddingHorizontal="@dimen/main_activity_padding"
android:paddingVertical="32dp"
android:orientation="vertical"
android:animateLayoutChanges="true">
Expand Down
22 changes: 1 addition & 21 deletions app/src/main/res/layout/activity_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/main_activity_padding"
android:paddingTop="8dp">

<TextView
android:id="@+id/general_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="1.0"
android:paddingHorizontal="32dp"
android:paddingVertical="8dp"
android:text="@string/general"
android:textColor="?attr/colorAccent"
Expand All @@ -52,8 +52,6 @@
android:clickable="true"
android:focusable="true"
android:paddingVertical="16dp"
android:paddingStart="32dp"
android:paddingEnd="0dp"
android:text="@string/vibration"
android:textColor="?attr/colorOnBackground"
android:textSize="15sp"
Expand All @@ -65,7 +63,6 @@
android:id="@+id/hapticFeedback"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/hapticFeedbackLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -79,7 +76,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/sound_effects"
android:textColor="?attr/colorOnBackground"
Expand All @@ -92,7 +88,6 @@
android:id="@+id/soundEffects"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/soundEffectsLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -106,7 +101,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/animations"
android:textColor="?attr/colorOnBackground"
Expand All @@ -119,7 +113,6 @@
android:id="@+id/animations"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:background="?android:attr/selectableItemBackground"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/animationsLabel"
Expand All @@ -134,7 +127,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/show_windows"
android:textColor="?attr/colorOnBackground"
Expand All @@ -147,7 +139,6 @@
android:id="@+id/showWindows"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/showWindowsLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -161,7 +152,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/open_on_game"
android:textColor="?attr/colorOnBackground"
Expand All @@ -174,7 +164,6 @@
android:id="@+id/openDirectly"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/openDirectlyLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -186,7 +175,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:alpha="1.0"
android:paddingHorizontal="32dp"
android:paddingVertical="8dp"
android:text="@string/settings_gameplay"
android:textColor="?attr/colorAccent"
Expand All @@ -203,7 +191,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/use_question_mark"
android:textColor="?attr/colorOnBackground"
Expand All @@ -216,7 +203,6 @@
android:id="@+id/useQuestionMark"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/useQuestionMarkLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -230,7 +216,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/enable_automatic_flags"
android:textColor="?attr/colorOnBackground"
Expand All @@ -242,7 +227,6 @@
android:id="@+id/automaticFlags"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/automaticFlagsLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -256,7 +240,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/no_guessing_mode"
android:textColor="?attr/colorOnBackground"
Expand All @@ -269,7 +252,6 @@
android:id="@+id/noGuessing"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/noGuessingLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -283,7 +265,6 @@
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="32dp"
android:paddingVertical="16dp"
android:text="@string/help"
android:textColor="?attr/colorOnBackground"
Expand All @@ -296,7 +277,6 @@
android:id="@+id/help"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="32dp"
android:paddingVertical="16dp"
app:layout_constraintBottom_toBottomOf="@+id/helpLabel"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/layout/activity_stats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:paddingVertical="16dp"
android:paddingHorizontal="@dimen/main_activity_padding"
android:clipToPadding="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/view_stats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginHorizontal="8dp"
android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ val LevelModule = module {
} bind IStatsRepository::class

single {
MinefieldRepository(get())
MinefieldRepository()
} bind IMinefieldRepository::class

single {
Expand Down
Loading

0 comments on commit 3524eab

Please sign in to comment.