Archived
Dialogs now use MaterialComponents styling, many elements now have rounded borders
This commit is contained in:
@@ -148,7 +148,7 @@ internal class FirstTime : AppCompatActivity(R.layout.activity_first_time) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createDialog(title: String, text: String) {
|
private fun createDialog(title: String, text: String) {
|
||||||
val alertDialog = AlertDialog.Builder(context, R.style.AlertDialog)
|
val alertDialog = AlertDialog.Builder(context)
|
||||||
val dialogView = View.inflate(context, R.layout.simple_dialog, null)
|
val dialogView = View.inflate(context, R.layout.simple_dialog, null)
|
||||||
val dialogTitle = dialogView.findViewById<TextView>(R.id.textviewtitle)
|
val dialogTitle = dialogView.findViewById<TextView>(R.id.textviewtitle)
|
||||||
val dialogText = dialogView.findViewById<TextView>(R.id.dialogtext)
|
val dialogText = dialogView.findViewById<TextView>(R.id.dialogtext)
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ internal class Main : AppCompatActivity(R.layout.app_bar_main) {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
context = this
|
context = this
|
||||||
// prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
val edit = prefs.edit()
|
val edit = prefs.edit()
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ import com.google.android.material.button.MaterialButton
|
|||||||
import com.google.firebase.messaging.FirebaseMessaging
|
import com.google.firebase.messaging.FirebaseMessaging
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
internal class SettingsFragment : Fragment(), View.OnClickListener,
|
internal class SettingsFragment : Fragment(), View.OnClickListener, View.OnLongClickListener,
|
||||||
CompoundButton.OnCheckedChangeListener, ColourAdapter.OnColourClickListener,
|
CompoundButton.OnCheckedChangeListener, ColourAdapter.OnColourClickListener,
|
||||||
RingtoneAdapter.OnRingtoneClickListener {
|
RingtoneAdapter.OnRingtoneClickListener {
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
private val customTabsIntent = CustomTabsIntent.Builder().build() as CustomTabsIntent
|
private val customTabsIntent = CustomTabsIntent.Builder().build() as CustomTabsIntent
|
||||||
private var window: Window? = null
|
private var window: Window? = null
|
||||||
private var longPressed = false
|
private var longPressed = false
|
||||||
private var courseHelpClicks = 0
|
private var versionCount = 0
|
||||||
|
|
||||||
private val ringtones: List<Ringtone> by lazy {
|
private val ringtones: List<Ringtone> by lazy {
|
||||||
getRingtones()
|
getRingtones()
|
||||||
@@ -59,6 +59,8 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
private lateinit var ringtoneDialog: AlertDialog
|
private lateinit var ringtoneDialog: AlertDialog
|
||||||
|
|
||||||
private lateinit var binding: ContentSettingsBinding
|
private lateinit var binding: ContentSettingsBinding
|
||||||
|
private lateinit var textCustomiseColoursTitle: TextView
|
||||||
|
private lateinit var textCustomiseColoursDesc: TextView
|
||||||
|
|
||||||
override fun onAttach(context: Context) {
|
override fun onAttach(context: Context) {
|
||||||
super.onAttach(context)
|
super.onAttach(context)
|
||||||
@@ -78,6 +80,9 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
binding.apply {
|
binding.apply {
|
||||||
val thisFragment = this@SettingsFragment
|
val thisFragment = this@SettingsFragment
|
||||||
|
|
||||||
|
thisFragment.textCustomiseColoursTitle = textCustomiseColoursTitle
|
||||||
|
thisFragment.textCustomiseColoursDesc = textCustomiseColoursDesc
|
||||||
|
|
||||||
// Set text
|
// Set text
|
||||||
setRingtoneText()
|
setRingtoneText()
|
||||||
|
|
||||||
@@ -98,27 +103,12 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
buttonVersion.setOnClickListener(thisFragment)
|
buttonVersion.setOnClickListener(thisFragment)
|
||||||
|
|
||||||
// Set on long click listeners
|
// Set on long click listeners
|
||||||
buttonCustomiseColours.setOnLongClickListener {
|
buttonCustomiseColours.setOnLongClickListener(thisFragment)
|
||||||
if (!longPressed) {
|
|
||||||
textCustomiseColoursTitle.text = getString(R.string.made_by_deniz)
|
|
||||||
textCustomiseColoursDesc.text = getString(R.string.thanks_for_using)
|
|
||||||
} else {
|
|
||||||
textCustomiseColoursTitle.text = getString(R.string.customise_colours_title)
|
|
||||||
textCustomiseColoursDesc.text = getString(R.string.customise_colours_desc)
|
|
||||||
}
|
|
||||||
longPressed = !longPressed
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
buttonForcedRefresh.setOnLongClickListener {
|
buttonCoursesHelp.setOnLongClickListener(thisFragment)
|
||||||
prefs.edit().putString("timeNew", "").putString("newFoodTime", "").apply()
|
buttonOrderHelp.setOnLongClickListener(thisFragment)
|
||||||
makeToast(mContext.getString(R.string.force_refresh_cleared_times))
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
buttonVersion.setOnLongClickListener {
|
buttonForcedRefresh.setOnLongClickListener(thisFragment)
|
||||||
debugMenu()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set on checked change listeners
|
// Set on checked change listeners
|
||||||
switchGreeting.setOnCheckedChangeListener(thisFragment)
|
switchGreeting.setOnCheckedChangeListener(thisFragment)
|
||||||
@@ -214,7 +204,6 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Functions for handling touch events in this fragment
|
// Functions for handling touch events in this fragment
|
||||||
override fun onClick(v: View?) {
|
override fun onClick(v: View?) {
|
||||||
when (v?.id) {
|
when (v?.id) {
|
||||||
@@ -224,22 +213,7 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
R.id.button_group_help -> createDialog(getString(R.string.grade_help_dialog_title), getString(
|
R.id.button_group_help -> createDialog(getString(R.string.grade_help_dialog_title), getString(
|
||||||
R.string.grade_help_dialog_text
|
R.string.grade_help_dialog_text
|
||||||
))
|
))
|
||||||
R.id.button_courses_help -> {
|
R.id.button_courses_help -> createDialog(getString(R.string.courses_help_dialog_title), getString(R.string.courses_help_dialog_text))
|
||||||
if (courseHelpClicks < 11) {
|
|
||||||
courseHelpClicks += 1
|
|
||||||
createDialog(getString(R.string.courses_help_dialog_title), getString(R.string.courses_help_dialog_text))
|
|
||||||
} else {
|
|
||||||
courseHelpClicks = 0
|
|
||||||
try {
|
|
||||||
makeToast(String(Character.toChars(0x2764)))
|
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://www.youtube.com/watch?v=Jc2xfYuLWgE")) // 'Freak'
|
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK).setPackage("com.google.android.youtube")
|
|
||||||
startActivity(intent)
|
|
||||||
} catch (e: ActivityNotFoundException) {
|
|
||||||
makeToast(getString(R.string.youtube_not_found))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
R.id.button_order_help -> createDialog(getString(R.string.ordering_systems_dialog_title), getString(R.string.ordering_systems_dialog_text))
|
R.id.button_order_help -> createDialog(getString(R.string.ordering_systems_dialog_title), getString(R.string.ordering_systems_dialog_text))
|
||||||
R.id.button_forced_refresh -> {
|
R.id.button_forced_refresh -> {
|
||||||
DataFetcher(
|
DataFetcher(
|
||||||
@@ -261,6 +235,54 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
R.id.button_licences -> {
|
R.id.button_licences -> {
|
||||||
createDialog(mContext.getString(R.string.licences_title), licences)
|
createDialog(mContext.getString(R.string.licences_title), licences)
|
||||||
}
|
}
|
||||||
|
R.id.button_version -> {
|
||||||
|
if (versionCount == 7) {
|
||||||
|
makeToast(getString(R.string.congratulations_for_nothing))
|
||||||
|
}
|
||||||
|
versionCount += 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onLongClick(v: View?): Boolean {
|
||||||
|
return when (v?.id) {
|
||||||
|
R.id.button_customise_colours -> {
|
||||||
|
if (!longPressed) {
|
||||||
|
textCustomiseColoursTitle.text = getString(R.string.made_by_deniz)
|
||||||
|
textCustomiseColoursDesc.text = getString(R.string.thanks_for_using)
|
||||||
|
} else {
|
||||||
|
textCustomiseColoursTitle.text = getString(R.string.customise_colours_title)
|
||||||
|
textCustomiseColoursDesc.text = getString(R.string.customise_colours_desc)
|
||||||
|
}
|
||||||
|
longPressed = !longPressed
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.button_courses_help -> {
|
||||||
|
val link = Uri.parse("https://www.youtube.com/watch?v=Jc2xfYuLWgE") // 'Freak'
|
||||||
|
makeToast(String(Character.toChars(0x2764)))
|
||||||
|
try {
|
||||||
|
val intent = Intent(Intent.ACTION_VIEW, link)
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK).setPackage("com.google.android.youtube")
|
||||||
|
startActivity(intent)
|
||||||
|
} catch (e: ActivityNotFoundException) {
|
||||||
|
try {
|
||||||
|
customTabsIntent.launchUrl(mContext, link)
|
||||||
|
} catch (e: ActivityNotFoundException) {
|
||||||
|
makeToast(getString(R.string.youtube_not_found))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.button_order_help -> {
|
||||||
|
debugMenu()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.button_forced_refresh -> {
|
||||||
|
prefs.edit().putString("timeNew", "").putString("newFoodTime", "").apply()
|
||||||
|
makeToast(mContext.getString(R.string.force_refresh_cleared_times))
|
||||||
|
true
|
||||||
|
}
|
||||||
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,7 +312,7 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
|
|
||||||
// Functions for handling touch events for recycler view elements
|
// Functions for handling touch events for recycler view elements
|
||||||
override fun onColourClick(position: Int, title: String, titleNoLang: String) {
|
override fun onColourClick(position: Int, title: String, titleNoLang: String) {
|
||||||
val colourPickerBuilder = AlertDialog.Builder(mContext, R.style.AlertDialog)
|
val colourPickerBuilder = AlertDialog.Builder(mContext)
|
||||||
val pickerDialogView = View.inflate(mContext, R.layout.empty_dialog, null)
|
val pickerDialogView = View.inflate(mContext, R.layout.empty_dialog, null)
|
||||||
val pickerTitleText = pickerDialogView.findViewById<TextView>(R.id.empty_textviewtitle)
|
val pickerTitleText = pickerDialogView.findViewById<TextView>(R.id.empty_textviewtitle)
|
||||||
val pickerLayout = pickerDialogView.findViewById<LinearLayout>(R.id.empty_linearlayout)
|
val pickerLayout = pickerDialogView.findViewById<LinearLayout>(R.id.empty_linearlayout)
|
||||||
@@ -330,9 +352,7 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
|
|
||||||
// Functions for handling dialog creation
|
// Functions for handling dialog creation
|
||||||
private fun createDialog(title: String, text: String) {
|
private fun createDialog(title: String, text: String) {
|
||||||
val alertDialog = AlertDialog.Builder(mContext,
|
val alertDialog = AlertDialog.Builder(mContext)
|
||||||
R.style.AlertDialog
|
|
||||||
)
|
|
||||||
val dialogView = View.inflate(mContext, R.layout.simple_dialog, null)
|
val dialogView = View.inflate(mContext, R.layout.simple_dialog, null)
|
||||||
dialogView.findViewById<TextView>(R.id.textviewtitle).text = title
|
dialogView.findViewById<TextView>(R.id.textviewtitle).text = title
|
||||||
dialogView.findViewById<TextView>(R.id.dialogtext).text = text
|
dialogView.findViewById<TextView>(R.id.dialogtext).text = text
|
||||||
@@ -340,7 +360,7 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createColourDialog() {
|
private fun createColourDialog() {
|
||||||
val colourCustomisationDialogBuilder = AlertDialog.Builder(mContext, R.style.AlertDialog)
|
val colourCustomisationDialogBuilder = AlertDialog.Builder(mContext)
|
||||||
|
|
||||||
val dialogView = View.inflate(mContext, R.layout.recycler_dialog, null)
|
val dialogView = View.inflate(mContext, R.layout.recycler_dialog, null)
|
||||||
val titleText = dialogView.findViewById<TextView>(R.id.empty_textviewtitle)
|
val titleText = dialogView.findViewById<TextView>(R.id.empty_textviewtitle)
|
||||||
@@ -365,7 +385,7 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
}
|
}
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} else {
|
} else {
|
||||||
val ringtoneCustomiserBuilder = AlertDialog.Builder(mContext, R.style.AlertDialog)
|
val ringtoneCustomiserBuilder = AlertDialog.Builder(mContext)
|
||||||
|
|
||||||
val dialogView = View.inflate(mContext, R.layout.recycler_dialog, null)
|
val dialogView = View.inflate(mContext, R.layout.recycler_dialog, null)
|
||||||
val titleText = dialogView.findViewById<TextView>(R.id.empty_textviewtitle)
|
val titleText = dialogView.findViewById<TextView>(R.id.empty_textviewtitle)
|
||||||
@@ -380,18 +400,14 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
|
|
||||||
ringtoneDialog = ringtoneCustomiserBuilder.setView(dialogView).create()
|
ringtoneDialog = ringtoneCustomiserBuilder.setView(dialogView).create()
|
||||||
ringtoneDialog.show()
|
ringtoneDialog.show()
|
||||||
|
|
||||||
// recycler.postDelayed({
|
|
||||||
// recycler.
|
|
||||||
// }, 100)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun debugMenu(): Boolean {
|
private fun debugMenu(): Boolean {
|
||||||
val alertDialog = AlertDialog.Builder(mContext, R.style.AlertDialog)
|
val alertDialog = AlertDialog.Builder(mContext)
|
||||||
val dialogView = View.inflate(mContext, R.layout.edittext_dialog, null)
|
val dialogView = View.inflate(mContext, R.layout.edittext_dialog, null)
|
||||||
val dialogEditText = dialogView.findViewById<EditText>(R.id.dialog_edittext)
|
val dialogEditText = dialogView.findViewById<EditText>(R.id.dialog_edittext)
|
||||||
val dialogButton = dialogView.findViewById<Button>(R.id.dialog_button)
|
val dialogButton = dialogView.findViewById<MaterialButton>(R.id.dialog_button)
|
||||||
|
|
||||||
dialogView.findViewById<TextView>(R.id.textviewtitle).text = getString(
|
dialogView.findViewById<TextView>(R.id.textviewtitle).text = getString(
|
||||||
R.string.experimental_menu_dialog_title
|
R.string.experimental_menu_dialog_title
|
||||||
@@ -402,11 +418,11 @@ internal class SettingsFragment : Fragment(), View.OnClickListener,
|
|||||||
dialogButton.setOnClickListener {
|
dialogButton.setOnClickListener {
|
||||||
when (dialogEditText.text.toString()) {
|
when (dialogEditText.text.toString()) {
|
||||||
"_STATISTICS" -> {
|
"_STATISTICS" -> {
|
||||||
val alertDialogDev = AlertDialog.Builder(mContext, R.style.AlertDialog)
|
val alertDialogDev = AlertDialog.Builder(mContext)
|
||||||
val devDialogView = View.inflate(mContext, R.layout.diagnostics_dialog, null)
|
val devDialogView = View.inflate(mContext, R.layout.diagnostics_dialog, null)
|
||||||
val devDialogText = devDialogView.findViewById<TextView>(R.id.dialogtext)
|
val devDialogText = devDialogView.findViewById<TextView>(R.id.dialogtext)
|
||||||
val resetLaunchBtn = devDialogView.findViewById<Button>(R.id.btnResetLaunch)
|
val resetLaunchBtn = devDialogView.findViewById<MaterialButton>(R.id.btnResetLaunch)
|
||||||
val resetNotificationBtn = devDialogView.findViewById<Button>(R.id.btnResetNotif)
|
val resetNotificationBtn = devDialogView.findViewById<MaterialButton>(R.id.btnResetNotif)
|
||||||
|
|
||||||
devDialogView.findViewById<TextView>(R.id.textviewtitle).text = getString(R.string.statistics_dialog_title)
|
devDialogView.findViewById<TextView>(R.id.textviewtitle).text = getString(R.string.statistics_dialog_title)
|
||||||
devDialogText.text = getDiagnosticsText()
|
devDialogText.text = getDiagnosticsText()
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:scrollbars="vertical">
|
android:scrollbars="vertical"
|
||||||
|
android:background="@color/colorBackgroundLight">
|
||||||
|
|
||||||
<TableRow
|
<TableRow
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -61,7 +61,11 @@
|
|||||||
app:boxStrokeWidth="1dp"
|
app:boxStrokeWidth="1dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/header_personalise">
|
app:layout_constraintTop_toBottomOf="@+id/header_personalise"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/edittext_name"
|
android:id="@+id/edittext_name"
|
||||||
@@ -120,7 +124,11 @@
|
|||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/switch_greeting">
|
app:layout_constraintTop_toBottomOf="@+id/switch_greeting"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
<AutoCompleteTextView
|
||||||
android:id="@+id/autocomplete_dark_mode"
|
android:id="@+id/autocomplete_dark_mode"
|
||||||
@@ -328,7 +336,11 @@
|
|||||||
app:layout_constraintEnd_toStartOf="@+id/button_group_help"
|
app:layout_constraintEnd_toStartOf="@+id/button_group_help"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/header_filter"
|
app:layout_constraintTop_toBottomOf="@+id/header_filter"
|
||||||
android:importantForAutofill="no">
|
android:importantForAutofill="no"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/edittext_group"
|
android:id="@+id/edittext_group"
|
||||||
@@ -371,7 +383,11 @@
|
|||||||
app:boxStrokeWidth="1dp"
|
app:boxStrokeWidth="1dp"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textinputlayout_group"
|
app:layout_constraintStart_toStartOf="@+id/textinputlayout_group"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textinputlayout_group"
|
app:layout_constraintTop_toBottomOf="@+id/textinputlayout_group"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/button_courses_help">
|
app:layout_constraintEnd_toStartOf="@+id/button_courses_help"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/edittext_courses"
|
android:id="@+id/edittext_courses"
|
||||||
@@ -412,7 +428,11 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/button_order_help"
|
app:layout_constraintEnd_toStartOf="@+id/button_order_help"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textinputlayout_courses">
|
app:layout_constraintTop_toBottomOf="@+id/textinputlayout_courses"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
<AutoCompleteTextView
|
<AutoCompleteTextView
|
||||||
android:id="@+id/autocomplete_order"
|
android:id="@+id/autocomplete_order"
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/colorBackgroundLight">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textviewtitle"
|
android:id="@+id/textviewtitle"
|
||||||
@@ -39,7 +40,8 @@
|
|||||||
android:paddingBottom="24dp"
|
android:paddingBottom="24dp"
|
||||||
android:paddingTop="8dp"/>
|
android:paddingTop="8dp"/>
|
||||||
|
|
||||||
<Button
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
android:id="@+id/btnResetLaunch"
|
android:id="@+id/btnResetLaunch"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -49,10 +51,11 @@
|
|||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:text="Reset launch counter"
|
android:text="Reset launch counter"
|
||||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
tools:ignore="HardcodedText"
|
||||||
tools:ignore="HardcodedText" />
|
app:cornerRadius="12dp"/>
|
||||||
|
|
||||||
<Button
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
android:id="@+id/btnResetNotif"
|
android:id="@+id/btnResetNotif"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -63,8 +66,8 @@
|
|||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:text="Reset ping counter"
|
android:text="Reset ping counter"
|
||||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
tools:ignore="HardcodedText"
|
||||||
tools:ignore="HardcodedText" />
|
app:cornerRadius="12dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorBackgroundLight">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textviewtitle"
|
android:id="@+id/textviewtitle"
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
android:textAlignment="viewStart"/>
|
android:textAlignment="viewStart"/>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="8dp">
|
android:paddingTop="8dp">
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dialogtext"
|
android:id="@+id/dialogtext"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:textColor="@color/colorText"/>
|
android:textColor="@color/colorText"/>
|
||||||
|
|
||||||
@@ -47,7 +48,11 @@
|
|||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:textColorHint="@color/colorHint"
|
android:textColorHint="@color/colorHint"
|
||||||
android:importantForAutofill="no">
|
android:importantForAutofill="no"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/dialog_edittext"
|
android:id="@+id/dialog_edittext"
|
||||||
@@ -61,7 +66,7 @@
|
|||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<Button
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/dialog_button"
|
android:id="@+id/dialog_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -69,7 +74,8 @@
|
|||||||
android:text="@string/apply"
|
android:text="@string/apply"
|
||||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||||
app:strokeColor="@color/colorAccent"
|
app:strokeColor="@color/colorAccent"
|
||||||
app:strokeWidth="2dp"/>
|
app:strokeWidth="2dp"
|
||||||
|
app:cornerRadius="12dp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorBackgroundLight">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/empty_textviewtitle"
|
android:id="@+id/empty_textviewtitle"
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/colorBackgroundLight">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/empty_textviewtitle"
|
android:id="@+id/empty_textviewtitle"
|
||||||
|
|||||||
@@ -44,10 +44,10 @@
|
|||||||
<string name="grade_help_dialog_title">Wie du deine Klasse eintragen kannst</string>
|
<string name="grade_help_dialog_title">Wie du deine Klasse eintragen kannst</string>
|
||||||
<string name="courses_help_dialog_text">Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen und über welche du benachrichtigt werden möchtest. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet.</string>
|
<string name="courses_help_dialog_text">Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen und über welche du benachrichtigt werden möchtest. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet.</string>
|
||||||
<string name="grade_help_dialog_text">Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht und über Aktualisierungen informiert zu werden.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen einzutragen ist nicht empfohlen.</string>
|
<string name="grade_help_dialog_text">Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht und über Aktualisierungen informiert zu werden.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen einzutragen ist nicht empfohlen.</string>
|
||||||
<string name="experimental_menu_dialog_text">Dieses Menü ist derzeit nur für Tests gedacht. Zusätzliche Funktionalität könnte in der Zukunft hinzugefügt werden. Probier\' gerne zufällige Codes aus.</string>
|
<string name="experimental_menu_dialog_text">Dieses Menü dient für Tests.</string>
|
||||||
<string name="apply">Anwenden</string>
|
<string name="apply">Anwenden</string>
|
||||||
<string name="invalid_code">Ungültiger Code</string>
|
<string name="invalid_code">Ungültiger Code</string>
|
||||||
<string name="experimental_menu_dialog_title">Experimentalmenü</string>
|
<string name="experimental_menu_dialog_title">Testmenü</string>
|
||||||
<string name="statistics_dialog_title">Statistikmenü</string>
|
<string name="statistics_dialog_title">Statistikmenü</string>
|
||||||
<string name="enable_course_notifications">Kursbenachrichtigungen aktivieren</string>
|
<string name="enable_course_notifications">Kursbenachrichtigungen aktivieren</string>
|
||||||
<string name="no_personal_substitutions">Kein Entfall für dich</string>
|
<string name="no_personal_substitutions">Kein Entfall für dich</string>
|
||||||
@@ -162,4 +162,5 @@
|
|||||||
<string name="ordering_systems_dialog_text">Du kannst zwischen zwei Sortierweisen auswählen, welche die Reihenfolge der Einträge auf dem Vertretungsplan bestimmen.\n\nStandardmäßig ist \'App-spezifisch\' ausgewählt; dies bietet einen konsistenten Plan sortiert nach Klassen, dann nach Stunden.\n\n\'Website-Original\' bietet die Original-Reihenfolge der Website. Diese ist jedoch nicht konsistent, weswegen \'App-spezifisch\' standardmäßig ausgewählt ist.</string>
|
<string name="ordering_systems_dialog_text">Du kannst zwischen zwei Sortierweisen auswählen, welche die Reihenfolge der Einträge auf dem Vertretungsplan bestimmen.\n\nStandardmäßig ist \'App-spezifisch\' ausgewählt; dies bietet einen konsistenten Plan sortiert nach Klassen, dann nach Stunden.\n\n\'Website-Original\' bietet die Original-Reihenfolge der Website. Diese ist jedoch nicht konsistent, weswegen \'App-spezifisch\' standardmäßig ausgewählt ist.</string>
|
||||||
<string name="error_please_try_again">Ein Fehler ist aufgetreten, bitte versuche es erneut</string>
|
<string name="error_please_try_again">Ein Fehler ist aufgetreten, bitte versuche es erneut</string>
|
||||||
<string name="thanks_for_using">Danke, dass du die App nutzt!</string>
|
<string name="thanks_for_using">Danke, dass du die App nutzt!</string>
|
||||||
|
<string name="congratulations_for_nothing">Gratulation! Du hast nichts erreicht.</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -53,9 +53,9 @@
|
|||||||
<string name="grade_help_dialog_text">Enter your current grade to have it appear in your personal plan and be notified about any information.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nEntering multiple grades is not recommended.</string>
|
<string name="grade_help_dialog_text">Enter your current grade to have it appear in your personal plan and be notified about any information.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nEntering multiple grades is not recommended.</string>
|
||||||
<string name="courses_help_dialog_title">How to enter your courses</string>
|
<string name="courses_help_dialog_title">How to enter your courses</string>
|
||||||
<string name="courses_help_dialog_text">You need to enter the course abbreviation for every course you want in your personal plan and want to be notified about. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required.</string>
|
<string name="courses_help_dialog_text">You need to enter the course abbreviation for every course you want in your personal plan and want to be notified about. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required.</string>
|
||||||
<string name="experimental_menu_dialog_title">Experimental Menu</string>
|
<string name="experimental_menu_dialog_title">Testing Menu</string>
|
||||||
<string name="statistics_dialog_title">Statistics Menu</string>
|
<string name="statistics_dialog_title">Statistics Menu</string>
|
||||||
<string name="experimental_menu_dialog_text">This menu is currently intended for testing only. Additional features may be added in the future. Feel free to try arbitrary codes.</string>
|
<string name="experimental_menu_dialog_text">This menu is intended for testing only.</string>
|
||||||
<string name="apply">Apply</string>
|
<string name="apply">Apply</string>
|
||||||
<string name="invalid_code">Invalid code</string>
|
<string name="invalid_code">Invalid code</string>
|
||||||
<string name="no_personal_substitutions">No substitutions for you</string>
|
<string name="no_personal_substitutions">No substitutions for you</string>
|
||||||
@@ -174,4 +174,5 @@
|
|||||||
<string name="ordering_systems_dialog_text">You may pick between two ordering systems that dictate the order in which the items on the substitution plan will appear in.\n\nThe default \'app-specific\' is an algorithm implemented in this app that provides a consistently-sorted substitution plan ordered just like the substitution plan on the website used to; sorted by classes, then by time.\n\n\'Website original\' offers the items on the substitution plan just like they\'re presented on the school website, but since these are not guaranteed to be consistent, \'app-specific\' is picked by default.</string>
|
<string name="ordering_systems_dialog_text">You may pick between two ordering systems that dictate the order in which the items on the substitution plan will appear in.\n\nThe default \'app-specific\' is an algorithm implemented in this app that provides a consistently-sorted substitution plan ordered just like the substitution plan on the website used to; sorted by classes, then by time.\n\n\'Website original\' offers the items on the substitution plan just like they\'re presented on the school website, but since these are not guaranteed to be consistent, \'app-specific\' is picked by default.</string>
|
||||||
<string name="error_please_try_again">An error occurred, please try again</string>
|
<string name="error_please_try_again">An error occurred, please try again</string>
|
||||||
<string name="thanks_for_using">Thanks for using the app!</string>
|
<string name="thanks_for_using">Thanks for using the app!</string>
|
||||||
|
<string name="congratulations_for_nothing">Congratulations! You have achieved nothing.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -19,11 +19,7 @@
|
|||||||
<item name="android:statusBarColor">@color/colorBackground</item>
|
<item name="android:statusBarColor">@color/colorBackground</item>
|
||||||
<item name="android:windowLightStatusBar" tools:targetApi="23">@bool/isLight</item>
|
<item name="android:windowLightStatusBar" tools:targetApi="23">@bool/isLight</item>
|
||||||
<item name="android:windowLightNavigationBar" tools:targetApi="27">@bool/isLight</item>
|
<item name="android:windowLightNavigationBar" tools:targetApi="27">@bool/isLight</item>
|
||||||
</style>
|
<item name="alertDialogTheme">@style/AppTheme0.AlertDialogTheme</item>
|
||||||
|
|
||||||
<style name="AlertDialog" parent="Theme.MaterialComponents.Light.Dialog.Alert">
|
|
||||||
<item name="android:background">@color/colorBackgroundLight</item>
|
|
||||||
<item name="android:textColorPrimary">@color/colorText</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Launch / splash screen -->
|
<!-- Launch / splash screen -->
|
||||||
@@ -33,4 +29,8 @@
|
|||||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="AppTheme0.AlertDialogTheme" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
|
||||||
|
<item name="dialogCornerRadius">12dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user