diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
index 79ee123c..6e6eec11 100644
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -1,5 +1,6 @@
+
\ No newline at end of file
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/Messages.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/Messages.kt
index 6e9626c9..adb80996 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/Messages.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/Messages.kt
@@ -1,7 +1,12 @@
package com.github.braillesystems.learnbraille.ui
import android.content.Context
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
+import androidx.fragment.app.FragmentActivity
import com.github.braillesystems.learnbraille.R
import com.github.braillesystems.learnbraille.data.entities.*
import com.github.braillesystems.learnbraille.res.inputMarkerPrintRules
@@ -10,6 +15,7 @@ import com.github.braillesystems.learnbraille.res.showMarkerPrintRules
import com.github.braillesystems.learnbraille.res.showSymbolPrintRules
import com.github.braillesystems.learnbraille.ui.views.BrailleDotsViewMode
import com.github.braillesystems.learnbraille.utils.*
+import kotlinx.android.synthetic.main.fragment_flip_dialog.view.*
fun Fragment.showCorrectToast() = toast(getString(R.string.input_correct))
@@ -63,3 +69,19 @@ fun Context.showPrint(data: MaterialData): String =
fun Fragment.showPrint(data: MaterialData): String =
contextNotNull.showPrint(data)
+
+fun FragmentActivity.showFlipPreferenceDialog() {
+ val viewGroup: ViewGroup = findViewById(android.R.id.content)
+ val dialogView: View =
+ LayoutInflater.from(this).inflate(R.layout.fragment_flip_dialog, viewGroup, false)
+ val builder: AlertDialog.Builder = AlertDialog.Builder(this)
+ builder.setView(dialogView)
+ builder.setTitle(getString(R.string.fragment_flip_dialog_title))
+ val alertDialog: AlertDialog = builder.create()
+ alertDialog.show()
+ dialogView.btnOK.setOnClickListener {
+ val flipPreferenceOn = dialogView.radioButtonFlip.isChecked
+ // TODO save preference & never ask again
+ alertDialog.hide()
+ }
+}
diff --git a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/menu/MenuFragment.kt b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/menu/MenuFragment.kt
index 5a9e2ae9..0e99e687 100644
--- a/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/menu/MenuFragment.kt
+++ b/app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/menu/MenuFragment.kt
@@ -15,11 +15,13 @@ import com.github.braillesystems.learnbraille.data.db.LearnBrailleDatabase
import com.github.braillesystems.learnbraille.databinding.FragmentMenuBinding
import com.github.braillesystems.learnbraille.ui.screens.AbstractFragmentWithHelp
import com.github.braillesystems.learnbraille.ui.screens.theory.toLastCourseStep
+import com.github.braillesystems.learnbraille.ui.showFlipPreferenceDialog
import com.github.braillesystems.learnbraille.utils.*
import com.google.android.material.button.MaterialButton
import org.koin.android.ext.android.inject
import timber.log.Timber
+
class MenuFragment : AbstractFragmentWithHelp(R.string.menu_help) {
private val db: LearnBrailleDatabase by inject()
@@ -97,6 +99,7 @@ class MenuFragment : AbstractFragmentWithHelp(R.string.menu_help) {
}
colorButtons(buttons)
+ activity?.showFlipPreferenceDialog() // TODO ask in practice and theory
}.root
diff --git a/app/src/main/res/layout/fragment_flip_dialog.xml b/app/src/main/res/layout/fragment_flip_dialog.xml
new file mode 100644
index 00000000..5835e6c8
--- /dev/null
+++ b/app/src/main/res/layout/fragment_flip_dialog.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4c2357f1..3670052c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -549,4 +549,16 @@
За последние 7 дней
За последние 30 дней
Шеститочие: письмо/чтение
+
+ Выберите порядок столбцов в шеститочии
+
+ Выберите удобный Вам вариант расположения точек при вводе.
+
+
+ Вы всегда сможете изменить это значение в разделе \"Настройки\"/
+ \"Порядок столбцов при вводе\"
+
+ OK
+ Точки 1, 2, 3 справа (как при письме на брайлевском приборе)
+ Точки 1, 2, 3 слева (как при чтении)