diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt
index 555f3cd3..3e1a82a6 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt
@@ -11,7 +11,6 @@ import com.github.braillesystems.learnbraille.data.entities.MarkerSymbol
import com.github.braillesystems.learnbraille.data.entities.Material
import com.github.braillesystems.learnbraille.databinding.FragmentMarkerViewBinding
import com.github.braillesystems.learnbraille.res.showMarkerPrintRules
-import com.github.braillesystems.learnbraille.ui.dotsMode
import com.github.braillesystems.learnbraille.ui.screens.AbstractFragmentWithHelp
import com.github.braillesystems.learnbraille.ui.screens.BrailleDotsInfo
import com.github.braillesystems.learnbraille.ui.screens.FragmentBinding
@@ -47,12 +46,9 @@ class MarkerViewFragment : AbstractFragmentWithHelp(R.string.browser_marker_view
val text = showMarkerPrintRules.getValue(m.data.type)
infoTextView.text = text
checkedAnnounce(text)
-
brailleDots.dotsState.display(m.data.brailleDots)
- checkedToast(dotsMode(brailleDots.mode))
flipButton.setOnClickListener {
brailleDots.reflect().display(m.data.brailleDots)
- checkedToast(dotsMode(brailleDots.mode))
}
}.root
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/SymbolViewFragment.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/SymbolViewFragment.kt
index ef427766..dd29e978 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/SymbolViewFragment.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/SymbolViewFragment.kt
@@ -48,10 +48,8 @@ class SymbolViewFragment : AbstractFragmentWithHelp(R.string.browser_symbol_view
checkedAnnounce(showPrint(m.data))
brailleDots.dotsState.display(m.data.brailleDots)
- checkedToast(dotsMode(brailleDots.mode))
flipButton.setOnClickListener {
brailleDots.reflect().display(m.data.brailleDots)
- checkedToast(dotsMode(brailleDots.mode))
}
}.root
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/practice/CardFragment.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/practice/CardFragment.kt
index 8590d13b..2ea31ff6 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/practice/CardFragment.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/practice/CardFragment.kt
@@ -86,7 +86,6 @@ class CardFragment : AbstractFragmentWithHelp(R.string.practice_help) {
binding.flipButton.setOnClickListener {
dotsState = binding.brailleDots.reflect().apply {
dotsState.subscribe(viewModel)
- checkedToast(dotsMode(binding.brailleDots.mode))
if (viewModel.state == DotsChecker.State.HINT) {
viewModel.expectedDots?.let { display(it) }
}
@@ -158,10 +157,7 @@ class CardFragment : AbstractFragmentWithHelp(R.string.practice_help) {
getString(R.string.practice_deck_name_disabled_template)
}
toast(
- template.format(
- deckTagToName.getValue(tag),
- dotsMode(binding.brailleDots.mode)
- )
+ template.format(deckTagToName.getValue(tag))
)
}
)
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/AbstractStepFragment.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/AbstractStepFragment.kt
index 110f2a5c..1d9bc363 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/AbstractStepFragment.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/AbstractStepFragment.kt
@@ -9,7 +9,6 @@ import android.widget.TextView
import com.github.braillesystems.learnbraille.COURSE
import com.github.braillesystems.learnbraille.R
import com.github.braillesystems.learnbraille.data.entities.Step
-import com.github.braillesystems.learnbraille.ui.dotsMode
import com.github.braillesystems.learnbraille.ui.screens.AbstractFragmentWithHelp
import com.github.braillesystems.learnbraille.ui.screens.BrailleDotsInfo
import com.github.braillesystems.learnbraille.ui.screens.FragmentBinding
@@ -18,7 +17,7 @@ import com.github.braillesystems.learnbraille.ui.screens.theory.getStepArg
import com.github.braillesystems.learnbraille.ui.screens.theory.toCurrentStep
import com.github.braillesystems.learnbraille.ui.screens.theory.toNextStep
import com.github.braillesystems.learnbraille.ui.screens.theory.toPrevStep
-import com.github.braillesystems.learnbraille.utils.checkedToast
+import com.github.braillesystems.learnbraille.utils.checkedAnnounce
import com.github.braillesystems.learnbraille.utils.navigate
import com.github.braillesystems.learnbraille.utils.title
@@ -83,12 +82,6 @@ abstract class AbstractStepFragment(helpMsgId: HelpMsgId) : AbstractFragmentWith
protected open fun iniStepHelper() = Unit
- protected fun toastDotsMode() {
- binding.brailleDotsInfo?.view?.mode?.let {
- checkedToast(dotsMode(it))
- }
- }
-
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(
if (preferenceRepository.extendedAccessibilityEnabled) R.menu.steps_menu_hide
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/input/AbstractInputStepFragment.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/input/AbstractInputStepFragment.kt
index 58028265..26049080 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/input/AbstractInputStepFragment.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/input/AbstractInputStepFragment.kt
@@ -51,14 +51,12 @@ abstract class AbstractInputStepFragment(helpMsgId: HelpMsgId) : AbstractStepFra
val buzzer: Vibrator? = activity?.getSystemService()
- toastDotsMode()
stepBinding.flipButton?.setOnClickListener {
dotsState = stepBinding.brailleDotsInfo!!.view.reflect().apply {
subscribe(View.OnClickListener {
viewModel.onSoftCheck()
userTouchedDots = true
})
- toastDotsMode()
if (viewModel.state == DotsChecker.State.HINT) {
display(expectedDots)
}
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/show/AbstractShowStepFragment.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/show/AbstractShowStepFragment.kt
index 8f233250..47106b6d 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/show/AbstractShowStepFragment.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/theory/steps/show/AbstractShowStepFragment.kt
@@ -13,10 +13,8 @@ abstract class AbstractShowStepFragment(helpMsgId: HelpMsgId) : AbstractStepFrag
require(data is BaseShow)
stepBinding.brailleDotsInfo?.view?.dotsState?.display(data.brailleDots)
?: error("Show step should have braille dots")
- toastDotsMode()
stepBinding.flipButton?.setOnClickListener {
stepBinding.brailleDotsInfo?.view?.reflect()?.display(data.brailleDots)
- toastDotsMode()
}
}
}
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/views/BrailleDotsView.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/views/BrailleDotsView.kt
index c4dc0a99..d4551ec8 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/views/BrailleDotsView.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/views/BrailleDotsView.kt
@@ -18,9 +18,7 @@ import com.github.braillesystems.learnbraille.data.entities.spelling
import com.github.braillesystems.learnbraille.data.repository.PreferenceRepository
import com.github.braillesystems.learnbraille.ui.views.BrailleDotsViewMode.Reading
import com.github.braillesystems.learnbraille.ui.views.BrailleDotsViewMode.Writing
-import com.github.braillesystems.learnbraille.utils.chainify
-import com.github.braillesystems.learnbraille.utils.forEach
-import com.github.braillesystems.learnbraille.utils.unreachable
+import com.github.braillesystems.learnbraille.utils.*
import kotlinx.android.synthetic.main.braille_dots_view.view.*
import org.koin.core.KoinComponent
import org.koin.core.inject
@@ -108,6 +106,13 @@ class BrailleDotsView : ConstraintLayout, KoinComponent {
Timber.w("API level < 22, unable co control accessibility traversal order")
}
+ context.announce(
+ when (mode) {
+ Writing -> context.getString(R.string.braille_dots_mode_writing)
+ Reading -> context.getString(R.string.braille_dots_mode_reading)
+ }
+ )
+
this.mode = mode
}
@@ -117,27 +122,27 @@ class BrailleDotsView : ConstraintLayout, KoinComponent {
}
private fun setDescriptionMode(mode: BrailleDotsViewMode) {
- when (mode) {
- Writing -> forEach(
- dotButton4 to R.string.braille_dot_1,
- dotButton5 to R.string.braille_dot_2,
- dotButton6 to R.string.braille_dot_3,
- dotButton1 to R.string.braille_dot_4,
- dotButton2 to R.string.braille_dot_5,
- dotButton3 to R.string.braille_dot_6
- ) { (dotButton, id) ->
- dotButton.contentDescription = context.getString(id)
- }
- Reading -> forEach(
- dotButton1 to R.string.braille_dot_1,
- dotButton2 to R.string.braille_dot_2,
- dotButton3 to R.string.braille_dot_3,
- dotButton4 to R.string.braille_dot_4,
- dotButton5 to R.string.braille_dot_5,
- dotButton6 to R.string.braille_dot_6
- ) { (dotButton, id) ->
- dotButton.contentDescription = context.getString(id)
- }
+ val dotsMapping = when (mode) {
+ Writing -> listOf(
+ Triple(dotButton4, R.string.braille_dot_1, R.string.braille_dot_1_text),
+ Triple(dotButton5, R.string.braille_dot_2, R.string.braille_dot_2_text),
+ Triple(dotButton6, R.string.braille_dot_3, R.string.braille_dot_3_text),
+ Triple(dotButton1, R.string.braille_dot_4, R.string.braille_dot_4_text),
+ Triple(dotButton2, R.string.braille_dot_5, R.string.braille_dot_5_text),
+ Triple(dotButton3, R.string.braille_dot_6, R.string.braille_dot_6_text)
+ )
+ Reading -> listOf(
+ Triple(dotButton1, R.string.braille_dot_1, R.string.braille_dot_1_text),
+ Triple(dotButton2, R.string.braille_dot_2, R.string.braille_dot_2_text),
+ Triple(dotButton3, R.string.braille_dot_3, R.string.braille_dot_3_text),
+ Triple(dotButton4, R.string.braille_dot_4, R.string.braille_dot_4_text),
+ Triple(dotButton5, R.string.braille_dot_5, R.string.braille_dot_5_text),
+ Triple(dotButton6, R.string.braille_dot_6, R.string.braille_dot_6_text)
+ )
+ }
+ dotsMapping.forEach { (dotButton, desc_id, caption_id) ->
+ dotButton.contentDescription = context.getString(desc_id)
+ dotButton.text = context.getString(caption_id)
}
}
diff --git a/app/src/main/res/drawable/round_checkbox.xml b/app/src/main/res/drawable/round_checkbox.xml
index cd049921..e67a3adc 100644
--- a/app/src/main/res/drawable/round_checkbox.xml
+++ b/app/src/main/res/drawable/round_checkbox.xml
@@ -1,6 +1,6 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/to_progress.xml b/app/src/main/res/drawable/to_progress.xml
deleted file mode 100644
index fd4c2672..00000000
--- a/app/src/main/res/drawable/to_progress.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/braille_dots_view.xml b/app/src/main/res/layout/braille_dots_view.xml
index 1535a5e8..b17e598b 100644
--- a/app/src/main/res/layout/braille_dots_view.xml
+++ b/app/src/main/res/layout/braille_dots_view.xml
@@ -15,6 +15,7 @@
android:layout_marginEnd="@dimen/braille_dots_inner_horizontal_margin"
android:layout_marginBottom="@dimen/braille_dots_inner_vertical_margin"
android:contentDescription="@string/braille_dot_1"
+ android:text="@string/braille_dot_1_text"
app:layout_constraintBottom_toTopOf="@+id/dotButton2"
app:layout_constraintEnd_toStartOf="@+id/dotButton4"
app:layout_constraintHorizontal_bias="0.5"
@@ -30,6 +31,7 @@
android:layout_marginEnd="@dimen/braille_dots_outer_horizontal_margin"
android:layout_marginBottom="@dimen/braille_dots_inner_vertical_margin"
android:contentDescription="@string/braille_dot_2"
+ android:text="@string/braille_dot_2_text"
app:layout_constraintBottom_toTopOf="@+id/dotButton3"
app:layout_constraintEnd_toStartOf="@+id/dotButton5"
app:layout_constraintHorizontal_bias="0.5"
@@ -44,6 +46,7 @@
android:layout_marginEnd="@dimen/braille_dots_outer_horizontal_margin"
android:layout_marginBottom="@dimen/braille_dots_outer_vertical_margin"
android:contentDescription="@string/braille_dot_3"
+ android:text="@string/braille_dot_3_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/dotButton6"
app:layout_constraintHorizontal_bias="0.5"
@@ -58,6 +61,8 @@
android:layout_marginEnd="@dimen/braille_dots_outer_horizontal_margin"
android:layout_marginBottom="@dimen/braille_dots_inner_vertical_margin"
android:contentDescription="@string/braille_dot_4"
+ android:paddingEnd="@dimen/braille_dots_right_column_text_padding"
+ android:text="@string/braille_dot_4_text"
app:layout_constraintBottom_toTopOf="@+id/dotButton5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
@@ -72,6 +77,8 @@
android:layout_marginEnd="@dimen/braille_dots_outer_horizontal_margin"
android:layout_marginBottom="@dimen/braille_dots_inner_vertical_margin"
android:contentDescription="@string/braille_dot_5"
+ android:paddingEnd="@dimen/braille_dots_right_column_text_padding"
+ android:text="@string/braille_dot_5_text"
app:layout_constraintBottom_toTopOf="@+id/dotButton6"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
@@ -86,6 +93,8 @@
android:layout_marginEnd="@dimen/braille_dots_outer_horizontal_margin"
android:layout_marginBottom="@dimen/braille_dots_outer_vertical_margin"
android:contentDescription="@string/braille_dot_6"
+ android:paddingEnd="@dimen/braille_dots_right_column_text_padding"
+ android:text="@string/braille_dot_6_text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
diff --git a/app/src/main/res/values-sw320dp/dimens.xml b/app/src/main/res/values-sw320dp/dimens.xml
index f95fc631..63de5629 100644
--- a/app/src/main/res/values-sw320dp/dimens.xml
+++ b/app/src/main/res/values-sw320dp/dimens.xml
@@ -9,6 +9,8 @@
2.6
1.1
+ 0dp
+
0.85
0.9
diff --git a/app/src/main/res/values-sw360dp/dimens.xml b/app/src/main/res/values-sw360dp/dimens.xml
index 9fb5067e..584c44fb 100644
--- a/app/src/main/res/values-sw360dp/dimens.xml
+++ b/app/src/main/res/values-sw360dp/dimens.xml
@@ -9,6 +9,8 @@
2.6
1.25
+ 0dp
+
1
0.85
0.9
diff --git a/app/src/main/res/values-sw400dp/dimens.xml b/app/src/main/res/values-sw400dp/dimens.xml
index e0e9ebe7..38fac6e3 100644
--- a/app/src/main/res/values-sw400dp/dimens.xml
+++ b/app/src/main/res/values-sw400dp/dimens.xml
@@ -9,6 +9,8 @@
2.6
1.5
+ 0dp
+
0.85
0.9
diff --git a/app/src/main/res/values-sw600dp/dimens.xml b/app/src/main/res/values-sw600dp/dimens.xml
index 32c7b84c..90791389 100644
--- a/app/src/main/res/values-sw600dp/dimens.xml
+++ b/app/src/main/res/values-sw600dp/dimens.xml
@@ -9,6 +9,8 @@
2.6
1.8
+ 1dp
+
80dp
65dp
300dp
diff --git a/app/src/main/res/values-sw720dp/dimens.xml b/app/src/main/res/values-sw720dp/dimens.xml
index 70f79b1a..4722a3d3 100644
--- a/app/src/main/res/values-sw720dp/dimens.xml
+++ b/app/src/main/res/values-sw720dp/dimens.xml
@@ -9,6 +9,8 @@
2.6
2.1
+ 1dp
+
90dp
75dp
320dp
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index cacf9cb5..bd2407b8 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -8,6 +8,8 @@
25dp
2.6
1
+
+ 1dp
0.85
0.9
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4c2357f1..721cb503 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -129,10 +129,10 @@
Практика: %d из %d
Практика
- Колода: \"%s\"\n\"%s\"\nПовторять только изученные: включено
+ Колода: \"%s\"\nПовторять только изученные: включено
- Колода: \"%s\"\n\"%s\"\nПовторять только изученные: выключено
+ Колода: \"%s\"\nПовторять только изученные: выключено
Список колод
@@ -405,6 +405,13 @@
точка пять
точка шесть
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+
Справка
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index d2cfacdc..e8b9706a 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -44,7 +44,11 @@
- wrap_content
- @dimen/braille_dots_scale_of_one_dot
- @dimen/braille_dots_scale_of_one_dot
- - @drawable/round_checkbox
+ - @null
+ - @drawable/round_checkbox
+ - center
+ - @drawable/round_checkbox
+ - sans-serif-light