changed layout for every device
This commit is contained in:
@ -2,6 +2,8 @@ package com.dano.test1
|
||||
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import android.util.TypedValue
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
@ -28,12 +30,21 @@ class HandlerClientCoachCode(
|
||||
val clientCodeField = layout.findViewById<EditText>(R.id.client_code)
|
||||
val coachCodeField = layout.findViewById<EditText>(R.id.coach_code)
|
||||
val questionTextView = layout.findViewById<TextView>(R.id.question)
|
||||
val titleTextView = layout.findViewById<TextView>(R.id.textView)
|
||||
|
||||
// Fill question text using language manager
|
||||
questionTextView.text = question.question?.let {
|
||||
LanguageManager.getText(languageID, it)
|
||||
} ?: ""
|
||||
|
||||
// --- Schriftgrößen prozentual zur Bildschirmhöhe setzen ---
|
||||
// Passe die Prozente bei Bedarf an:
|
||||
setTextSizePercentOfScreenHeight(titleTextView, 0.03f) // 5.5% der Bildschirmhöhe
|
||||
setTextSizePercentOfScreenHeight(questionTextView,0.03f) // 5.0% der Bildschirmhöhe
|
||||
setTextSizePercentOfScreenHeight(clientCodeField, 0.025f) // 3.5% der Bildschirmhöhe
|
||||
setTextSizePercentOfScreenHeight(coachCodeField, 0.025f) // anpassen nach Geschmack
|
||||
// ----------------------------------------------------------
|
||||
|
||||
// Load last used client code if available
|
||||
val lastClientCode = GlobalValues.LAST_CLIENT_CODE
|
||||
if (!lastClientCode.isNullOrBlank()) {
|
||||
@ -58,6 +69,14 @@ class HandlerClientCoachCode(
|
||||
}
|
||||
}
|
||||
|
||||
// Deaktiviert AutoSize und setzt textSize in sp prozentual zur Bildschirmhöhe
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = layout.resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
|
||||
// Handle Next button click
|
||||
private fun onNextClicked(clientCodeField: EditText, coachCodeField: EditText) {
|
||||
if (!validate()) {
|
||||
@ -99,7 +118,6 @@ class HandlerClientCoachCode(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Handle Previous button click
|
||||
private fun onPreviousClicked(clientCodeField: EditText, coachCodeField: EditText) {
|
||||
val clientCode = clientCodeField.text.toString()
|
||||
|
||||
@ -8,6 +8,8 @@ import kotlinx.coroutines.*
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import android.util.TypedValue
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import android.widget.AbsListView
|
||||
|
||||
class HandlerDateSpinner(
|
||||
private val context: Context,
|
||||
@ -37,10 +39,22 @@ class HandlerDateSpinner(
|
||||
val questionTextView = layout.findViewById<TextView>(R.id.question)
|
||||
val textView = layout.findViewById<TextView>(R.id.textView)
|
||||
|
||||
val labelDay = layout.findViewById<TextView>(R.id.date_spinner_day)
|
||||
val labelMonth = layout.findViewById<TextView>(R.id.date_spinner_month)
|
||||
val labelYear = layout.findViewById<TextView>(R.id.date_spinner_year)
|
||||
|
||||
questionTextView.text = question.question?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
textView.text = question.textKey?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
|
||||
// --- gespeicherte Antwort aus answers oder null ---
|
||||
// —— Schriftgrößen pro Bildschirmhöhe ——
|
||||
setTextSizePercentOfScreenHeight(textView, 0.03f) // oben
|
||||
setTextSizePercentOfScreenHeight(questionTextView, 0.03f) // frage
|
||||
setTextSizePercentOfScreenHeight(labelDay, 0.025f)
|
||||
setTextSizePercentOfScreenHeight(labelMonth, 0.025f)
|
||||
setTextSizePercentOfScreenHeight(labelYear, 0.025f)
|
||||
// ————————————————————————————————
|
||||
|
||||
// gespeicherte Antwort (YYYY-MM-DD) lesen
|
||||
val (savedYear, savedMonthIndex, savedDay) = question.question?.let {
|
||||
parseSavedDate(answers[it] as? String)
|
||||
} ?: Triple(null, null, null)
|
||||
@ -55,11 +69,12 @@ class HandlerDateSpinner(
|
||||
?: months[today.get(Calendar.MONTH)]
|
||||
val defaultYear = savedYear ?: today.get(Calendar.YEAR)
|
||||
|
||||
// Spinner responsiv aufsetzen (Schrift + Zeilenhöhe ohne Abschneiden)
|
||||
setupSpinner(spinnerDay, days, defaultDay)
|
||||
setupSpinner(spinnerMonth, months, defaultMonth)
|
||||
setupSpinner(spinnerYear, years, defaultYear)
|
||||
|
||||
// --- DB-Abfrage falls noch nichts in answers gespeichert ---
|
||||
// DB-Abfrage, falls noch nicht im answers-Map
|
||||
val answerMapKey = question.question ?: (question.id ?: "")
|
||||
if (answerMapKey.isNotBlank() && !answers.containsKey(answerMapKey)) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
@ -187,28 +202,72 @@ class HandlerDateSpinner(
|
||||
return sdf.parse(dateString)
|
||||
}
|
||||
|
||||
// —— Textgröße prozentual zur Bildschirmhöhe (in sp) ——
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = (view.context ?: layout.context).resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
|
||||
// —— Spinner-Adapter: Schrift & Zeilenhöhe dynamisch, kein Abschneiden ——
|
||||
private fun <T> setupSpinner(spinner: Spinner, items: List<T>, defaultSelection: T?) {
|
||||
val dm = context.resources.displayMetrics
|
||||
|
||||
fun spFromScreenHeight(percent: Float): Float =
|
||||
(dm.heightPixels * percent) / dm.scaledDensity
|
||||
fun pxFromSp(sp: Float): Int = (sp * dm.scaledDensity).toInt()
|
||||
|
||||
val textSp = spFromScreenHeight(0.0275f) // ~2.75% der Bildschirmhöhe
|
||||
val textPx = pxFromSp(textSp)
|
||||
val vPadPx = (textPx * 0.50f).toInt() // vertikales Padding
|
||||
val rowHeight = (textPx * 2.20f + 2 * vPadPx).toInt() // feste Zeilenhöhe
|
||||
|
||||
val adapter = object : ArrayAdapter<T>(context, android.R.layout.simple_spinner_item, items) {
|
||||
private fun styleRow(tv: TextView, forceHeight: Boolean) {
|
||||
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSp)
|
||||
tv.includeFontPadding = true
|
||||
tv.setLineSpacing(0f, 1.2f)
|
||||
tv.gravity = (tv.gravity and android.view.Gravity.HORIZONTAL_GRAVITY_MASK) or android.view.Gravity.CENTER_VERTICAL
|
||||
tv.setPadding(tv.paddingLeft, vPadPx, tv.paddingRight, vPadPx)
|
||||
tv.minHeight = rowHeight
|
||||
tv.isSingleLine = true
|
||||
if (forceHeight) {
|
||||
val lp = tv.layoutParams
|
||||
if (lp == null || lp.height <= 0) {
|
||||
tv.layoutParams = AbsListView.LayoutParams(
|
||||
AbsListView.LayoutParams.MATCH_PARENT, rowHeight
|
||||
)
|
||||
} else {
|
||||
lp.height = rowHeight
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val v = super.getView(position, convertView, parent) as TextView
|
||||
v.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
styleRow(v, forceHeight = false) // ausgewählte Ansicht
|
||||
return v
|
||||
}
|
||||
|
||||
override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val v = super.getDropDownView(position, convertView, parent) as TextView
|
||||
v.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
styleRow(v, forceHeight = true) // Dropdown-Zeilen: Höhe erzwingen
|
||||
return v
|
||||
}
|
||||
}
|
||||
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||
spinner.adapter = adapter
|
||||
|
||||
// Spinner selbst ausreichend hoch
|
||||
spinner.setPadding(spinner.paddingLeft, vPadPx, spinner.paddingRight, vPadPx)
|
||||
spinner.minimumHeight = rowHeight
|
||||
spinner.requestLayout()
|
||||
|
||||
defaultSelection?.let {
|
||||
val index = items.indexOf(it)
|
||||
if (index >= 0) {
|
||||
spinner.setSelection(index)
|
||||
}
|
||||
if (index >= 0) spinner.setSelection(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,9 @@ import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import kotlinx.coroutines.*
|
||||
import android.util.TypedValue
|
||||
import android.widget.TextView
|
||||
import androidx.core.widget.TextViewCompat
|
||||
|
||||
class HandlerGlassScaleQuestion(
|
||||
private val context: Context,
|
||||
@ -14,15 +17,13 @@ class HandlerGlassScaleQuestion(
|
||||
private val goToNextQuestion: () -> Unit,
|
||||
private val goToPreviousQuestion: () -> Unit,
|
||||
private val showToast: (String) -> Unit,
|
||||
private val questionnaireMeta: String // neu: für DB-Abfrage wie bei anderen Handlern
|
||||
private val questionnaireMeta: String
|
||||
) : QuestionHandler {
|
||||
|
||||
private lateinit var layout: View
|
||||
private lateinit var question: QuestionItem.GlassScaleQuestion
|
||||
|
||||
private val scaleLabels = listOf(
|
||||
"never_glass", "little_glass", "moderate_glass", "much_glass", "extreme_glass"
|
||||
)
|
||||
private val scaleLabels = listOf("never_glass","little_glass","moderate_glass","much_glass","extreme_glass")
|
||||
|
||||
private val pointsMap = mapOf(
|
||||
"never_glass" to 0,
|
||||
@ -34,19 +35,25 @@ class HandlerGlassScaleQuestion(
|
||||
|
||||
override fun bind(layout: View, question: QuestionItem) {
|
||||
if (question !is QuestionItem.GlassScaleQuestion) return
|
||||
|
||||
this.layout = layout
|
||||
this.question = question
|
||||
|
||||
layout.findViewById<TextView>(R.id.textView).text =
|
||||
question.textKey?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
val titleTv = layout.findViewById<TextView>(R.id.textView)
|
||||
val questionTv = layout.findViewById<TextView>(R.id.question)
|
||||
|
||||
layout.findViewById<TextView>(R.id.question).text =
|
||||
question.question?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
// Texte setzen
|
||||
titleTv.text = question.textKey?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
questionTv.text = question.question?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
|
||||
// === Schriftgrößen prozentual zur Bildschirmhöhe ===
|
||||
setTextSizePercentOfScreenHeight(titleTv, 0.03f) // ~3% der Screen-Höhe
|
||||
setTextSizePercentOfScreenHeight(questionTv, 0.03f) // ~3% der Screen-Höhe
|
||||
// ===================================================
|
||||
|
||||
val tableLayout = layout.findViewById<TableLayout>(R.id.glass_table)
|
||||
tableLayout.removeAllViews()
|
||||
|
||||
// Header-Reihe
|
||||
val headerRow = TableRow(context).apply {
|
||||
layoutParams = TableLayout.LayoutParams(
|
||||
TableLayout.LayoutParams.MATCH_PARENT,
|
||||
@ -66,6 +73,8 @@ class HandlerGlassScaleQuestion(
|
||||
text = labelText
|
||||
gravity = Gravity.START
|
||||
layoutParams = TableRow.LayoutParams(0, TableRow.LayoutParams.WRAP_CONTENT, 1f)
|
||||
// Header-Text moderat skalieren (~2.2%)
|
||||
setTextSizePercentOfScreenHeight(this, 0.022f)
|
||||
}
|
||||
headerRow.addView(labelView)
|
||||
}
|
||||
@ -73,14 +82,8 @@ class HandlerGlassScaleQuestion(
|
||||
|
||||
addSymptomRows(tableLayout)
|
||||
|
||||
// --- DB-Abfrage: falls für eine Symptom-Antwort noch nichts im answers-Map steht ---
|
||||
// Wir holen alle Antworten für den Client und setzen dort, wo answers noch keinen Eintrag hat,
|
||||
// die gespeicherte DB-Antwort (und aktualisieren UI + points).
|
||||
val anySymptomNeedsRestore = question.symptoms.any { sym ->
|
||||
val key = sym
|
||||
!answers.containsKey(key)
|
||||
}
|
||||
|
||||
// ggf. DB-Restore
|
||||
val anySymptomNeedsRestore = question.symptoms.any { !answers.containsKey(it) }
|
||||
if (anySymptomNeedsRestore) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
try {
|
||||
@ -88,26 +91,17 @@ class HandlerGlassScaleQuestion(
|
||||
if (clientCode.isNullOrBlank()) return@launch
|
||||
|
||||
val allAnswersForClient = MyApp.database.answerDao().getAnswersForClient(clientCode)
|
||||
|
||||
// Bereite ein Map von questionId -> answerValue vor für schnellen Zugriff
|
||||
val answerMap = allAnswersForClient.associateBy({ it.questionId }, { it.answerValue })
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
// tableLayout: header ist bei index 0, symptom-rows ab index 1 in der gleichen Reihenfolge wie question.symptoms
|
||||
for ((index, symptomKey) in question.symptoms.withIndex()) {
|
||||
val answerMapKey = questionnaireMeta + "-" + symptomKey
|
||||
val dbAnswerRaw = answerMap[answerMapKey]
|
||||
val dbAnswer = dbAnswerRaw?.takeIf { it.isNotBlank() }?.trim()
|
||||
|
||||
// nur wenn noch nichts im answers-Map steht und DB-Antwort vorhanden
|
||||
val dbAnswer = answerMap[answerMapKey]?.takeIf { it.isNotBlank() }?.trim()
|
||||
if (!answers.containsKey(symptomKey) && !dbAnswer.isNullOrBlank()) {
|
||||
// finde die entsprechende TableRow (header = 0, erste symptom row = 1)
|
||||
val rowIndex = index + 1
|
||||
val rowIndex = index + 1 // Header ist 0
|
||||
if (rowIndex < tableLayout.childCount) {
|
||||
val row = tableLayout.getChildAt(rowIndex) as? TableRow ?: continue
|
||||
val radioGroup = row.getChildAt(1) as? RadioGroup ?: continue
|
||||
|
||||
// Suche RadioButton mit tag == dbAnswer und markiere ihn
|
||||
for (i in 0 until radioGroup.childCount) {
|
||||
val rb = radioGroup.getChildAt(i) as? RadioButton ?: continue
|
||||
if ((rb.tag as? String)?.trim() == dbAnswer) {
|
||||
@ -115,8 +109,6 @@ class HandlerGlassScaleQuestion(
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// answers und points aktualisieren
|
||||
answers[symptomKey] = dbAnswer
|
||||
val point = pointsMap[dbAnswer] ?: 0
|
||||
points.add(point)
|
||||
@ -135,8 +127,7 @@ class HandlerGlassScaleQuestion(
|
||||
saveAnswer()
|
||||
goToNextQuestion()
|
||||
} else {
|
||||
val message = LanguageManager.getText(languageID, "select_one_answer_per_row")
|
||||
showToast(message)
|
||||
showToast(LanguageManager.getText(languageID, "select_one_answer_per_row"))
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,6 +151,8 @@ class HandlerGlassScaleQuestion(
|
||||
text = LanguageManager.getText(languageID, symptomKey)
|
||||
layoutParams = TableRow.LayoutParams(0, TableRow.LayoutParams.WRAP_CONTENT, 4f)
|
||||
setPadding(4, 16, 4, 16)
|
||||
// Zeilenbeschriftung etwas kleiner als Titel (~2.2%)
|
||||
setTextSizePercentOfScreenHeight(this, 0.022f)
|
||||
}
|
||||
row.addView(symptomText)
|
||||
|
||||
@ -173,8 +166,9 @@ class HandlerGlassScaleQuestion(
|
||||
tag = labelKey
|
||||
id = View.generateViewId()
|
||||
isChecked = savedLabel == labelKey
|
||||
layoutParams =
|
||||
RadioGroup.LayoutParams(0, RadioGroup.LayoutParams.WRAP_CONTENT, 1f)
|
||||
layoutParams = RadioGroup.LayoutParams(
|
||||
0, RadioGroup.LayoutParams.WRAP_CONTENT, 1f
|
||||
)
|
||||
gravity = Gravity.CENTER
|
||||
}
|
||||
radioGroup.addView(radioButton)
|
||||
@ -189,38 +183,38 @@ class HandlerGlassScaleQuestion(
|
||||
for (i in 1 until table.childCount) {
|
||||
val row = table.getChildAt(i) as TableRow
|
||||
val radioGroup = row.getChildAt(1) as RadioGroup
|
||||
if (radioGroup.checkedRadioButtonId == -1) {
|
||||
return false
|
||||
}
|
||||
if (radioGroup.checkedRadioButtonId == -1) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun saveAnswer() {
|
||||
// Vorherige Punkte dieser Frage entfernen (falls vorhanden)
|
||||
question.symptoms.forEach {
|
||||
val previousLabel = answers[it] as? String
|
||||
val previousPoint = previousLabel?.let { lbl -> pointsMap[lbl] }
|
||||
if (previousPoint != null) {
|
||||
points.remove(previousPoint)
|
||||
}
|
||||
question.symptoms.forEach { key ->
|
||||
val previousLabel = answers[key] as? String
|
||||
previousLabel?.let { lbl -> pointsMap[lbl] }?.let { points.remove(it) }
|
||||
}
|
||||
|
||||
val table = layout.findViewById<TableLayout>(R.id.glass_table)
|
||||
for (i in 1 until table.childCount) {
|
||||
val row = table.getChildAt(i) as TableRow
|
||||
val symptomKey = question.symptoms[i - 1]
|
||||
|
||||
val radioGroup = row.getChildAt(1) as RadioGroup
|
||||
val checkedId = radioGroup.checkedRadioButtonId
|
||||
if (checkedId != -1) {
|
||||
val radioButton = radioGroup.findViewById<RadioButton>(checkedId)
|
||||
val selectedLabel = radioButton.tag as String
|
||||
answers[symptomKey] = selectedLabel
|
||||
|
||||
val point = pointsMap[selectedLabel] ?: 0
|
||||
points.add(point)
|
||||
points.add(pointsMap[selectedLabel] ?: 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Helper: Textgröße prozentual zur Bildschirmhöhe setzen (in sp)
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = (view.context ?: layout.context).resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,9 @@ import android.view.View
|
||||
import android.widget.*
|
||||
import android.text.Html
|
||||
import kotlinx.coroutines.*
|
||||
import android.util.TypedValue
|
||||
import android.widget.TextView
|
||||
import androidx.core.widget.TextViewCompat
|
||||
|
||||
class HandlerLastPage(
|
||||
private val answers: Map<String, Any>,
|
||||
@ -21,23 +24,27 @@ class HandlerLastPage(
|
||||
this.layout = layout
|
||||
currentQuestion = question as QuestionItem.LastPage
|
||||
|
||||
// Set localized text for the last page
|
||||
layout.findViewById<TextView>(R.id.textView).text =
|
||||
LanguageManager.getText(languageID, currentQuestion.textKey)
|
||||
val titleTv = layout.findViewById<TextView>(R.id.textView)
|
||||
val questionTv = layout.findViewById<TextView>(R.id.question)
|
||||
|
||||
// Set question text with HTML formatting
|
||||
layout.findViewById<TextView>(R.id.question).text =
|
||||
Html.fromHtml(
|
||||
LanguageManager.getText(languageID, currentQuestion.question),
|
||||
Html.FROM_HTML_MODE_LEGACY
|
||||
)
|
||||
// Texte setzen
|
||||
titleTv.text = LanguageManager.getText(languageID, currentQuestion.textKey)
|
||||
questionTv.text = Html.fromHtml(
|
||||
LanguageManager.getText(languageID, currentQuestion.question),
|
||||
Html.FROM_HTML_MODE_LEGACY
|
||||
)
|
||||
|
||||
// Setup previous button
|
||||
// ==== Schriftgrößen prozentual zur Bildschirmhöhe ====
|
||||
// Passe die Faktoren bei Bedarf an (z. B. 0.032f für etwas größer)
|
||||
setTextSizePercentOfScreenHeight(titleTv, 0.03f)
|
||||
setTextSizePercentOfScreenHeight(questionTv, 0.03f)
|
||||
// =====================================================
|
||||
|
||||
// Buttons
|
||||
layout.findViewById<Button>(R.id.Qprev).setOnClickListener {
|
||||
goToPreviousQuestion()
|
||||
}
|
||||
|
||||
// Setup finish button
|
||||
layout.findViewById<Button>(R.id.Qfinish).setOnClickListener {
|
||||
showLoading(true) // Show loading indicator
|
||||
|
||||
@ -74,6 +81,15 @@ class HandlerLastPage(
|
||||
override fun validate(): Boolean = true // No validation needed on last page
|
||||
override fun saveAnswer() {} // No answers to save here
|
||||
|
||||
// Helper: Textgröße prozentual zur Bildschirmhöhe setzen (in sp)
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = (view.context ?: layout.context).resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
// AutoSize ausschalten, damit unsere Größe nicht überschrieben wird
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
|
||||
// Calculate the sum of all keys ending with "_points"
|
||||
private fun sumPoints(): Int =
|
||||
answers.filterKeys { it.endsWith("_points") }
|
||||
|
||||
@ -5,6 +5,7 @@ import android.view.View
|
||||
import android.widget.*
|
||||
import kotlinx.coroutines.*
|
||||
import android.util.TypedValue
|
||||
import androidx.core.widget.TextViewCompat
|
||||
|
||||
class HandlerMultiCheckboxQuestion(
|
||||
private val context: Context,
|
||||
@ -28,9 +29,15 @@ class HandlerMultiCheckboxQuestion(
|
||||
val questionTitle = layout.findViewById<TextView>(R.id.question)
|
||||
val questionTextView = layout.findViewById<TextView>(R.id.textView)
|
||||
|
||||
// Texte setzen
|
||||
questionTextView.text = this.question.textKey?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
questionTitle.text = this.question.question?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
|
||||
// ===== Textgrößen pro Bildschirmhöhe (wie bei deinen anderen Handlern) =====
|
||||
setTextSizePercentOfScreenHeight(questionTextView, 0.03f) // Überschrift
|
||||
setTextSizePercentOfScreenHeight(questionTitle, 0.03f) // Frage
|
||||
// ==========================================================================
|
||||
|
||||
container.removeAllViews()
|
||||
|
||||
// bestehende Auswahl aus answers (falls vorhanden) als Set
|
||||
@ -38,14 +45,26 @@ class HandlerMultiCheckboxQuestion(
|
||||
(answers[it] as? List<*>)?.map { it.toString() }?.toSet()
|
||||
} ?: emptySet()
|
||||
|
||||
// ——— Checkbox-Schrift & Zeilenhöhe dynamisch ableiten (kein Abschneiden) ———
|
||||
val dm = layout.resources.displayMetrics
|
||||
val cbTextSp = (dm.heightPixels * 0.025f) / dm.scaledDensity // ~2.5% der Bildschirmhöhe
|
||||
val cbTextPx = cbTextSp * dm.scaledDensity
|
||||
val cbPadV = (cbTextPx * 0.40f).toInt()
|
||||
val cbMinH = (cbTextPx * 1.60f + 2 * cbPadV).toInt()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
this.question.options.forEach { option ->
|
||||
val checkBox = CheckBox(context).apply {
|
||||
text = LanguageManager.getText(languageID, option.key)
|
||||
tag = option.key
|
||||
isChecked = selectedKeys.contains(option.key)
|
||||
|
||||
// >>> Textgröße jeder Checkbox auf 30sp setzen <<<
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
// Textgröße prozentual & Zeilenhöhe/Padding für Lesbarkeit
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(this, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_SP, cbTextSp)
|
||||
includeFontPadding = true
|
||||
setPadding(paddingLeft, cbPadV, paddingRight, cbPadV)
|
||||
minHeight = cbMinH
|
||||
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
@ -142,13 +161,12 @@ class HandlerMultiCheckboxQuestion(
|
||||
}
|
||||
|
||||
question.question?.let { questionKey ->
|
||||
// entferne ggf. vorherige Punkte-Einträge für diese Frage, falls die answers-Map vorher schon einen Wert hatte.
|
||||
// ggf. alte Punkte entfernen
|
||||
val oldList = answers[questionKey] as? List<*>
|
||||
if (oldList != null) {
|
||||
val oldTotal = oldList.mapNotNull { it?.toString() }.sumOf { oldKey ->
|
||||
question.pointsMap?.get(oldKey) ?: 0
|
||||
}
|
||||
// Entfernen eines einzelnen Int-Wertes aus points (falls vorhanden)
|
||||
points.remove(oldTotal)
|
||||
}
|
||||
|
||||
@ -192,4 +210,12 @@ class HandlerMultiCheckboxQuestion(
|
||||
setOf(trimmed.trim().trim('"', '\''))
|
||||
}
|
||||
}
|
||||
|
||||
// Helper: Textgröße prozentual zur Bildschirmhöhe setzen
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = (view.context ?: layout.context).resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import android.text.Html
|
||||
import android.widget.*
|
||||
import kotlinx.coroutines.*
|
||||
import android.util.TypedValue
|
||||
import androidx.core.widget.TextViewCompat // <— hinzugefügt
|
||||
|
||||
class HandlerRadioQuestion(
|
||||
private val context: Context,
|
||||
@ -35,16 +36,22 @@ class HandlerRadioQuestion(
|
||||
Html.fromHtml(LanguageManager.getText(languageID, it), Html.FROM_HTML_MODE_LEGACY)
|
||||
} ?: ""
|
||||
|
||||
// === Schriftgrößen wie im HandlerClientCoachCode ===
|
||||
// Titel/Frage: 3% der Bildschirmhöhe
|
||||
setTextSizePercentOfScreenHeight(questionTextView, 0.03f)
|
||||
setTextSizePercentOfScreenHeight(questionTitle, 0.03f)
|
||||
// ===================================================
|
||||
|
||||
radioGroup.removeAllViews()
|
||||
|
||||
question.options.forEach { option ->
|
||||
val radioButton = RadioButton(context).apply {
|
||||
text = LanguageManager.getText(languageID, option.key)
|
||||
tag = option.key
|
||||
// >>> Schriftgröße 30sp <<<
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
|
||||
// >>> Breite fast so breit wie RadioGroup (MATCH_PARENT) <<<
|
||||
// RadioButton-Text analog zu EditTexts: 2.5% der Bildschirmhöhe
|
||||
setTextSizePercentOfScreenHeight(this, 0.025f)
|
||||
|
||||
layoutParams = RadioGroup.LayoutParams(
|
||||
RadioGroup.LayoutParams.MATCH_PARENT,
|
||||
RadioGroup.LayoutParams.WRAP_CONTENT
|
||||
@ -54,7 +61,6 @@ class HandlerRadioQuestion(
|
||||
setMargins(0, 0, 0, margin)
|
||||
}
|
||||
|
||||
// >>> Innenabstand (Padding), damit Text nicht direkt am Rand klebt <<<
|
||||
val padding = (12 * resources.displayMetrics.density).toInt()
|
||||
setPadding(padding, padding, padding, padding)
|
||||
}
|
||||
@ -126,6 +132,15 @@ class HandlerRadioQuestion(
|
||||
}
|
||||
}
|
||||
|
||||
// ——— Helper: setzt Textgröße prozentual zur Bildschirmhöhe (in sp) ———
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = (view.context ?: layout.context).resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
// ————————————————————————————————————————————————————————————————
|
||||
|
||||
private fun restorePreviousAnswer(radioGroup: RadioGroup) {
|
||||
question.question?.let { questionKey ->
|
||||
val savedAnswer = answers[questionKey] as? String
|
||||
@ -152,10 +167,8 @@ class HandlerRadioQuestion(
|
||||
val answerKey = selectedRadioButton.tag.toString()
|
||||
|
||||
question.question?.let { questionKey ->
|
||||
println("questionKey " + questionKey)
|
||||
val oldAnswerKey = answers[questionKey] as? String
|
||||
val oldPoint = oldAnswerKey?.let { question.pointsMap?.get(it) } ?: 0
|
||||
|
||||
points.remove(oldPoint)
|
||||
|
||||
answers[questionKey] = answerKey
|
||||
|
||||
@ -7,6 +7,7 @@ import android.widget.*
|
||||
import kotlinx.coroutines.*
|
||||
import android.util.TypedValue
|
||||
import android.widget.TextView
|
||||
import androidx.core.widget.TextViewCompat
|
||||
|
||||
class HandlerStringSpinner(
|
||||
private val context: Context,
|
||||
@ -15,7 +16,7 @@ class HandlerStringSpinner(
|
||||
private val goToNextQuestion: () -> Unit,
|
||||
private val goToPreviousQuestion: () -> Unit,
|
||||
private val showToast: (String) -> Unit,
|
||||
private val questionnaireMeta: String // neu: Meta, damit wir dieselbe DB-ID bilden können wie im Radio-Handler
|
||||
private val questionnaireMeta: String // Meta, damit dieselbe DB-ID wie in anderen Handlern gebildet wird
|
||||
) : QuestionHandler {
|
||||
|
||||
private lateinit var layout: View
|
||||
@ -31,17 +32,24 @@ class HandlerStringSpinner(
|
||||
val textView = layout.findViewById<TextView>(R.id.textView)
|
||||
val spinner = layout.findViewById<Spinner>(R.id.string_spinner)
|
||||
|
||||
// Texte setzen
|
||||
questionTextView.text = question.question?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
textView.text = question.textKey?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
|
||||
// === Textgrößen prozentual zur Bildschirmhöhe (wie im HandlerRadioQuestion) ===
|
||||
setTextSizePercentOfScreenHeight(textView, 0.03f)
|
||||
setTextSizePercentOfScreenHeight(questionTextView, 0.03f)
|
||||
// ==============================================================================
|
||||
|
||||
val options = buildOptionsList()
|
||||
|
||||
// Falls bereits im answers-Map ein Eintrag existiert, wird dieser als gespeicherte Auswahl übergeben
|
||||
// vorhandene Auswahl (falls vorhanden)
|
||||
val savedSelection = question.question?.let { answers[it] as? String }
|
||||
|
||||
// Spinner aufsetzen (Schriftgröße & Zeilenhöhe dynamisch, kein Abschneiden)
|
||||
setupSpinner(spinner, options, savedSelection)
|
||||
|
||||
// Wenn noch kein Eintrag im answers-Map existiert: DB abfragen (wie im Radio-Handler)
|
||||
// Falls noch keine Antwort im Map: aus DB laden (analog zu anderen Handlern)
|
||||
val answerMapKey = question.question ?: (question.id ?: "")
|
||||
if (answerMapKey.isNotBlank() && !answers.containsKey(answerMapKey)) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
@ -55,15 +63,9 @@ class HandlerStringSpinner(
|
||||
|
||||
if (!dbAnswer.isNullOrBlank()) {
|
||||
withContext(Dispatchers.Main) {
|
||||
// Falls ein alter Eintrag existiert (theoretisch), wird er überschrieben
|
||||
answers[answerMapKey] = dbAnswer
|
||||
|
||||
// Auswahl im Spinner setzen, falls die Option vorhanden ist
|
||||
val index = options.indexOf(dbAnswer)
|
||||
if (index >= 0) {
|
||||
spinner.setSelection(index)
|
||||
}
|
||||
// falls dbAnswer nicht in options ist: nichts machen (kann optional geloggt werden)
|
||||
if (index >= 0) spinner.setSelection(index)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
@ -100,10 +102,7 @@ class HandlerStringSpinner(
|
||||
override fun saveAnswer() {
|
||||
val spinner = layout.findViewById<Spinner>(R.id.string_spinner)
|
||||
val selected = spinner.selectedItem as? String ?: return
|
||||
|
||||
question.question?.let { key ->
|
||||
answers[key] = selected
|
||||
}
|
||||
question.question?.let { key -> answers[key] = selected }
|
||||
}
|
||||
|
||||
private fun buildOptionsList(): List<String> {
|
||||
@ -115,29 +114,73 @@ class HandlerStringSpinner(
|
||||
}
|
||||
}
|
||||
|
||||
// Textgröße prozentual zur Bildschirmhöhe setzen und AutoSize deaktivieren
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = (view.context ?: layout.context).resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
|
||||
// Spinner-Adapter mit dynamischer Schrift & stabiler Dropdown-Zeilenhöhe (kein Abschneiden)
|
||||
private fun <T> setupSpinner(spinner: Spinner, items: List<T>, selectedItem: T?) {
|
||||
// Adapter, der Textgröße für ausgewähltes Element + Dropdown auf 30sp setzt
|
||||
val dm = context.resources.displayMetrics
|
||||
|
||||
fun spFromScreenHeight(percent: Float): Float =
|
||||
(dm.heightPixels * percent) / dm.scaledDensity
|
||||
fun pxFromSp(sp: Float): Int = (sp * dm.scaledDensity).toInt()
|
||||
|
||||
// Schrift & abgeleitete Höhen (wie beim Value-Spinner-Fix)
|
||||
val textSp = spFromScreenHeight(0.0275f) // ~2.75% der Bildschirmhöhe
|
||||
val textPx = pxFromSp(textSp)
|
||||
val vPadPx = (textPx * 0.50f).toInt() // vertikales Padding
|
||||
val rowHeight = (textPx * 2.20f + 2 * vPadPx).toInt() // feste Zeilenhöhe, verhindert Abschneiden
|
||||
|
||||
val adapter = object : ArrayAdapter<T>(context, android.R.layout.simple_spinner_item, items) {
|
||||
private fun styleRow(tv: TextView, forceHeight: Boolean) {
|
||||
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSp)
|
||||
tv.includeFontPadding = true
|
||||
tv.setLineSpacing(0f, 1.2f)
|
||||
tv.gravity = (tv.gravity and android.view.Gravity.HORIZONTAL_GRAVITY_MASK) or android.view.Gravity.CENTER_VERTICAL
|
||||
tv.setPadding(tv.paddingLeft, vPadPx, tv.paddingRight, vPadPx)
|
||||
tv.minHeight = rowHeight
|
||||
tv.isSingleLine = true
|
||||
if (forceHeight) {
|
||||
val lp = tv.layoutParams
|
||||
if (lp == null || lp.height <= 0) {
|
||||
tv.layoutParams = AbsListView.LayoutParams(
|
||||
AbsListView.LayoutParams.MATCH_PARENT, rowHeight
|
||||
)
|
||||
} else {
|
||||
lp.height = rowHeight
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val v = super.getView(position, convertView, parent) as TextView
|
||||
v.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
styleRow(v, forceHeight = false) // ausgewählte Ansicht
|
||||
return v
|
||||
}
|
||||
|
||||
override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val v = super.getDropDownView(position, convertView, parent) as TextView
|
||||
v.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
styleRow(v, forceHeight = true) // Dropdown-Zeilen: Höhe erzwingen
|
||||
return v
|
||||
}
|
||||
}
|
||||
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||
spinner.adapter = adapter
|
||||
|
||||
// Spinner selbst ausreichend hoch machen
|
||||
spinner.setPadding(spinner.paddingLeft, vPadPx, spinner.paddingRight, vPadPx)
|
||||
spinner.minimumHeight = rowHeight
|
||||
spinner.requestLayout()
|
||||
|
||||
selectedItem?.let {
|
||||
val index = items.indexOf(it)
|
||||
if (index >= 0) {
|
||||
spinner.setSelection(index)
|
||||
}
|
||||
if (index >= 0) spinner.setSelection(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import android.view.ViewGroup
|
||||
import android.widget.*
|
||||
import kotlinx.coroutines.*
|
||||
import android.util.TypedValue
|
||||
import androidx.core.widget.TextViewCompat // <- NEU
|
||||
|
||||
class HandlerValueSpinner(
|
||||
private val context: Context,
|
||||
@ -34,6 +35,12 @@ class HandlerValueSpinner(
|
||||
questionTextView.text = question.question?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
textView.text = question.textKey?.let { LanguageManager.getText(languageID, it) } ?: ""
|
||||
|
||||
// === Schriftgrößen wie im HandlerRadioQuestion ===
|
||||
// Titel/Frage: 3% der Bildschirmhöhe
|
||||
setTextSizePercentOfScreenHeight(textView, 0.03f)
|
||||
setTextSizePercentOfScreenHeight(questionTextView, 0.03f)
|
||||
// =================================================
|
||||
|
||||
val prompt = LanguageManager.getText(languageID, "choose_answer")
|
||||
val spinnerItems: List<String> = listOf(prompt) + if (question.range != null) {
|
||||
(question.range.min..question.range.max).map { it.toString() }
|
||||
@ -113,26 +120,73 @@ class HandlerValueSpinner(
|
||||
}
|
||||
}
|
||||
|
||||
// ——— Helper: setzt Textgröße prozentual zur Bildschirmhöhe (in sp) ———
|
||||
private fun setTextSizePercentOfScreenHeight(view: TextView, percentOfHeight: Float) {
|
||||
val dm = (view.context ?: layout.context).resources.displayMetrics
|
||||
val sp = (dm.heightPixels * percentOfHeight) / dm.scaledDensity
|
||||
TextViewCompat.setAutoSizeTextTypeWithDefaults(view, TextViewCompat.AUTO_SIZE_TEXT_TYPE_NONE)
|
||||
view.setTextSize(TypedValue.COMPLEX_UNIT_SP, sp)
|
||||
}
|
||||
// ————————————————————————————————————————————————————————————————
|
||||
|
||||
private fun <T> setupSpinner(spinner: Spinner, items: List<T>, selectedItem: T?) {
|
||||
val dm = context.resources.displayMetrics
|
||||
|
||||
fun spFromScreenHeight(percent: Float): Float =
|
||||
(dm.heightPixels * percent) / dm.scaledDensity
|
||||
fun pxFromSp(sp: Float): Int = (sp * dm.scaledDensity).toInt()
|
||||
|
||||
// Schrift & abgeleitete Höhen
|
||||
val textSp = spFromScreenHeight(0.0275f) // ~2.75% der Bildschirmhöhe
|
||||
val textPx = pxFromSp(textSp)
|
||||
val vPadPx = (textPx * 0.50f).toInt() // vertikales Padding
|
||||
val rowHeight = (textPx * 2.20f + 2 * vPadPx).toInt() // feste Zeilenhöhe
|
||||
|
||||
val adapter = object : ArrayAdapter<T>(context, android.R.layout.simple_spinner_item, items) {
|
||||
private fun styleRow(tv: TextView, forceHeight: Boolean) {
|
||||
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, textSp)
|
||||
tv.includeFontPadding = true
|
||||
tv.setLineSpacing(0f, 1.2f)
|
||||
tv.gravity = (tv.gravity and android.view.Gravity.HORIZONTAL_GRAVITY_MASK) or android.view.Gravity.CENTER_VERTICAL
|
||||
tv.setPadding(tv.paddingLeft, vPadPx, tv.paddingRight, vPadPx)
|
||||
tv.minHeight = rowHeight
|
||||
tv.isSingleLine = true
|
||||
if (forceHeight) {
|
||||
val lp = tv.layoutParams
|
||||
if (lp == null || lp.height <= 0) {
|
||||
tv.layoutParams = AbsListView.LayoutParams(
|
||||
AbsListView.LayoutParams.MATCH_PARENT, rowHeight
|
||||
)
|
||||
} else {
|
||||
lp.height = rowHeight
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val v = super.getView(position, convertView, parent) as TextView
|
||||
v.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
styleRow(v, forceHeight = false) // ausgewählte Ansicht
|
||||
return v
|
||||
}
|
||||
|
||||
override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val v = super.getDropDownView(position, convertView, parent) as TextView
|
||||
v.setTextSize(TypedValue.COMPLEX_UNIT_SP, 30f)
|
||||
styleRow(v, forceHeight = true) // Dropdown-Zeilen: Höhe erzwingen
|
||||
return v
|
||||
}
|
||||
}
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
|
||||
spinner.adapter = adapter
|
||||
|
||||
// Spinner selbst ausreichend hoch machen
|
||||
spinner.setPadding(spinner.paddingLeft, vPadPx, spinner.paddingRight, vPadPx)
|
||||
spinner.minimumHeight = rowHeight
|
||||
spinner.requestLayout()
|
||||
|
||||
selectedItem?.let {
|
||||
val index = items.indexOf(it)
|
||||
if (index >= 0) spinner.setSelection(index)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ object LanguageManager {
|
||||
"times_happend" to "Ist das ... passiert?",
|
||||
"age_at_incident" to "In welchem Alter: mit ... Jahren?",
|
||||
"conflict_since_arrival" to "Seitdem Sie in Deutschland sind, sind Sie jemals in gewalttätige Konflikte (Prügelei, körperlich, und psychische Konflikte) geraten?",
|
||||
"finish_data_entry" to "Wenn Sie nun mit der Dateneingabe fertig sind, klicken Sie auf \"Dateneingabe abschließen\".",
|
||||
"finish_data_entry" to "Wenn Sie nun mit der Dateneingabe fertig sind, klicken Sie auf \"Speichern\".",
|
||||
"feeling_connected_to_germany_question" to "Wie stark fühlen Sie sich Deutschland verbunden (in Deutschland angekommen)?",
|
||||
"intro_life_in_germany" to "Jetzt möchten wir Ihnen gerne noch einige Fragen zu Ihrem Leben in Deutschland stellen:",
|
||||
"not_connected_at_all" to "überhaupt nicht eng",
|
||||
@ -488,7 +488,7 @@ object LanguageManager {
|
||||
"times_happend" to "Has this ... happened?",
|
||||
"age_at_incident" to "At what age: at ... years?",
|
||||
"conflict_since_arrival" to "Since arriving in Germany, have you ever been involved in violent conflicts (physical fights, physical or psychological conflicts)?",
|
||||
"finish_data_entry" to "If you are now finished with data entry, please click on \"Complete data entry\".",
|
||||
"finish_data_entry" to "When you have finished entering the data, click \"Save\".",
|
||||
"feeling_connected_to_germany_question" to "How connected do you feel to Germany (how well have you settled in Germany)?",
|
||||
"intro_life_in_germany" to "Now we would like to ask you some questions about your life in Germany:",
|
||||
"not_connected_at_all" to "not connected at all",
|
||||
@ -782,7 +782,7 @@ object LanguageManager {
|
||||
"times_happend" to "Cela est-il arrivé ... ?",
|
||||
"age_at_incident" to "À quel âge : à ... ans ?",
|
||||
"conflict_since_arrival" to "Depuis votre arrivée en Allemagne, avez-vous été impliqué dans des conflits violents (bagarres, conflits physiques ou psychiques) ?",
|
||||
"finish_data_entry" to "Lorsque vous avez terminé la saisie des données, cliquez sur « Terminer la saisie des données ». ",
|
||||
"finish_data_entry" to "Lorsque vous avez terminé la saisie des données, cliquez sur \"Enregistrer\".",
|
||||
"feeling_connected_to_germany_question" to "Dans quelle mesure vous sentez-vous lié(e) à l’Allemagne (vous êtes arrivé(e) en Allemagne) ?",
|
||||
"intro_life_in_germany" to "Nous aimerions maintenant vous poser quelques questions sur votre vie en Allemagne :",
|
||||
"not_connected_at_all" to "Pas du tout lié(e)",
|
||||
@ -1080,7 +1080,7 @@ object LanguageManager {
|
||||
"times_happend" to "Сколько раз это происходило?",
|
||||
"age_at_incident" to "В каком возрасте?",
|
||||
"conflict_since_arrival" to "Бывали ли у вас с тех пор, как вы в Германии, случаи насильственных конфликтов (драки, физические или психологические конфликты)?",
|
||||
"finish_data_entry" to "Если вы завершили ввод данных, нажмите \"Завершить ввод данных\".",
|
||||
"finish_data_entry" to "Когда вы завершите ввод данных, нажмите \"Сохранить\".",
|
||||
"feeling_connected_to_germany_question" to "Насколько вы чувствуете себя связанным с Германией (адаптировались в Германии)?",
|
||||
"intro_life_in_germany" to "Теперь мы хотели бы задать вам несколько вопросов о вашей жизни в Германии:",
|
||||
"not_connected_at_all" to "совсем не связан",
|
||||
@ -1374,7 +1374,7 @@ object LanguageManager {
|
||||
"times_happend" to "Це сталося ... разів?",
|
||||
"age_at_incident" to "У якому віці: у ... років?",
|
||||
"conflict_since_arrival" to "Відтоді, як ви в Німеччині, чи потрапляли ви в насильницькі конфлікти (бійки, фізичні та психологічні конфлікти)?",
|
||||
"finish_data_entry" to "Коли ви закінчите вводити дані, натисніть «Завершити введення даних».",
|
||||
"finish_data_entry" to "Коли завершите введення даних, натисніть \"Зберегти\".",
|
||||
"feeling_connected_to_germany_question" to "Наскільки ви відчуваєте себе пов’язаним з Німеччиною (після прибуття в Німеччину)?",
|
||||
"intro_life_in_germany" to "Тепер ми хочемо поставити вам кілька запитань про ваше життя в Німеччині:",
|
||||
"not_connected_at_all" to "зовсім не пов’язаний",
|
||||
@ -1672,7 +1672,7 @@ object LanguageManager {
|
||||
"times_happend" to "Bu ... kez oldu mu?",
|
||||
"age_at_incident" to "Olay yaşandığında kaç yaşındaydınız?",
|
||||
"conflict_since_arrival" to "Almanya’ya geldikten sonra hiç şiddet içeren çatışmalara (kavga, fiziksel veya psikolojik) girdiniz mi?",
|
||||
"finish_data_entry" to "Veri girişi tamamlandığında \"Veri girişini tamamla\" butonuna tıklayın.",
|
||||
"finish_data_entry" to "Veri girişini tamamladığınızda \"Kaydet\"e tıklayın.",
|
||||
"feeling_connected_to_germany_question" to "Kendinizi Almanya’ya ne kadar bağlı hissediyorsunuz (Almanya’ya geldikten sonra)?",
|
||||
"intro_life_in_germany" to "Şimdi size Almanya’daki yaşamınızla ilgili bazı sorular sormak istiyoruz:",
|
||||
"not_connected_at_all" to "hiç bağlı değilim",
|
||||
@ -1970,7 +1970,7 @@ object LanguageManager {
|
||||
"times_happend" to "Czy to się wydarzyło ...?",
|
||||
"age_at_incident" to "W jakim wieku: w wieku ... lat?",
|
||||
"conflict_since_arrival" to "Czy od czasu przybycia do Niemiec zdarzyło się Panu/Pani uczestniczyć w aktach przemocy (bójki, konflikty fizyczne i psychiczne)?",
|
||||
"finish_data_entry" to "Jeśli zakończył(a) Pan/Pani wprowadzanie danych, proszę kliknąć \"Zakończ wprowadzanie danych\".",
|
||||
"finish_data_entry" to "Gdy zakończysz wprowadzanie danych, kliknij \"Zapisz\".",
|
||||
"feeling_connected_to_germany_question" to "Jak bardzo czuje się Pan/Pani związany(a) z Niemcami (czy czuje się Pan/Pani osiedlony(a) w Niemczech)?",
|
||||
"intro_life_in_germany" to "Teraz chcielibyśmy zadać kilka pytań dotyczących Pana/Pani życia w Niemczech:",
|
||||
"not_connected_at_all" to "w ogóle niezwiązany(a)",
|
||||
@ -2268,7 +2268,7 @@ object LanguageManager {
|
||||
"times_happend" to "هل حدث هذا ...؟",
|
||||
"age_at_incident" to "في أي عمر: عندما كنت بعمر ... سنة؟",
|
||||
"conflict_since_arrival" to "منذ وصولك إلى ألمانيا، هل دخلت في صراعات عنيفة (عراك، صراعات جسدية أو نفسية)؟",
|
||||
"finish_data_entry" to "إذا انتهيت الآن من إدخال البيانات، اضغط على \"إتمام إدخال البيانات\".",
|
||||
"finish_data_entry" to "عند الانتهاء من إدخال البيانات، انقر على \"حفظ\".",
|
||||
"feeling_connected_to_germany_question" to "ما مدى شعورك بالارتباط بألمانيا (هل تشعر أنك أصبحت جزءاً منها)؟",
|
||||
"intro_life_in_germany" to "الآن نود أن نطرح عليك بعض الأسئلة حول حياتك في ألمانيا:",
|
||||
"not_connected_at_all" to "غير مرتبط على الإطلاق",
|
||||
@ -2566,7 +2566,7 @@ object LanguageManager {
|
||||
"times_happend" to "Acest lucru s-a întâmplat ...?",
|
||||
"age_at_incident" to "La ce vârstă: la ... ani?",
|
||||
"conflict_since_arrival" to "De când sunteți în Germania, ați fost implicat(ă) în conflicte violente (bătaie, conflicte fizice sau psihice)?",
|
||||
"finish_data_entry" to "Dacă ați terminat acum introducerea datelor, dați click pe \"Finalizați introducerea datelor\".",
|
||||
"finish_data_entry" to "Când ați terminat introducerea datelor, faceți clic pe \"Salvează\".",
|
||||
"feeling_connected_to_germany_question" to "Cât de mult simțiți că sunteți legat(ă) de Germania (că v-ați integrat)?",
|
||||
"intro_life_in_germany" to "Acum dorim să vă adresăm câteva întrebări despre viața dumneavoastră în Germania:",
|
||||
"not_connected_at_all" to "deloc apropiat(ă)",
|
||||
@ -2864,7 +2864,7 @@ object LanguageManager {
|
||||
"times_happend" to "¿Ha ocurrido esto...?",
|
||||
"age_at_incident" to "¿A qué edad ocurrió? A los ... años",
|
||||
"conflict_since_arrival" to "¿Desde que llegó a Alemania, ha estado involucrado en conflictos violentos (peleas físicas o conflictos psicológicos)?",
|
||||
"finish_data_entry" to "Si ha terminado de ingresar los datos, haga clic en \"Finalizar registro de datos\".",
|
||||
"finish_data_entry" to "Cuando haya terminado de introducir los datos, haga clic en \"Guardar\".",
|
||||
"feeling_connected_to_germany_question" to "¿Qué tan conectado se siente con Alemania (llegado a Alemania)?",
|
||||
"intro_life_in_germany" to "Ahora nos gustaría hacerle algunas preguntas sobre su vida en Alemania:",
|
||||
"not_connected_at_all" to "no conectado en absoluto",
|
||||
|
||||
@ -11,90 +11,121 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qnext"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qnext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="next"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.943"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/client_code"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="30sp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.7"
|
||||
app:layout_constraintHeight_percent="0.08"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/question"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@android:drawable/edit_text"
|
||||
android:ems="10"
|
||||
android:inputType="text"
|
||||
android:tag="client_code"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.368" />
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeMaxTextSize="36sp"
|
||||
android:autoSizeStepGranularity="2sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/coach_code"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="30sp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.7"
|
||||
app:layout_constraintHeight_percent="0.08"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/client_code"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@android:drawable/edit_text"
|
||||
android:ems="10"
|
||||
android:inputType="text"
|
||||
android:tag="coach_code"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.499" />
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeMaxTextSize="36sp"
|
||||
android:autoSizeStepGranularity="2sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.104" />
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.188" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -5,131 +5,154 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- Obere Überschrift -->
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="40sp"
|
||||
android:textAlignment="center"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.104" />
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<!-- Frage -->
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.188" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_value_month"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="35dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.453"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date_spinner_month"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="40dp"
|
||||
android:tag="month"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.453"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.403" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date_spinner_day"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="day"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textAlignment="viewStart"
|
||||
android:paddingStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.108"
|
||||
app:layout_constraintHorizontal_bias="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.402" />
|
||||
app:layout_constraintTop_toBottomOf="@id/question"
|
||||
app:layout_constraintWidth_percent="0.22" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date_spinner_month"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="month"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textAlignment="viewStart"
|
||||
android:paddingStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.459"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/question"
|
||||
app:layout_constraintWidth_percent="0.40" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date_spinner_year"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:tag="year"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textAlignment="viewStart"
|
||||
android:paddingStart="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintHorizontal_bias="0.932"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.402" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_value_year"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="35dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/question"
|
||||
app:layout_constraintWidth_percent="0.32" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_value_day"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="35dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.108"
|
||||
app:layout_constraintHorizontal_bias="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/date_spinner_day"
|
||||
app:layout_constraintWidth_percent="0.22" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_value_month"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.459"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/date_spinner_month"
|
||||
app:layout_constraintWidth_percent="0.40" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_value_year"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.932"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/date_spinner_year"
|
||||
app:layout_constraintWidth_percent="0.32" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qnext"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qnext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="next"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.943"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
@ -5,13 +6,18 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="466dp"
|
||||
android:id="@+id/glassScroll"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:fillViewport="true"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/question"
|
||||
app:layout_constraintBottom_toTopOf="@+id/Qprev"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintWidth_percent="1">
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/glass_table"
|
||||
@ -23,59 +29,77 @@
|
||||
android:textStyle="bold" />
|
||||
</ScrollView>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qnext"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qnext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="next"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.943"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.104" />
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.188" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -5,60 +5,84 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="700dp"
|
||||
android:layout_height="200dp"
|
||||
android:tag="finish_data_entry"
|
||||
android:textAlignment="viewStart"
|
||||
android:textSize="40sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.505"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.546" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qfinish"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qfinish"
|
||||
android:layout_width="540dp"
|
||||
android:layout_height="60dp"
|
||||
android:tag="finish"
|
||||
android:textSize="30sp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="save"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="700dp"
|
||||
android:layout_height="200dp"
|
||||
android:tag="finish_data_entry"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textAlignment="viewStart"
|
||||
android:textSize="40sp"
|
||||
android:paddingStart="8dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.25"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.125" />
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textAlignment="viewStart"
|
||||
android:paddingStart="8dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.25"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
|
||||
<!-- ProgressBar for loading animation -->
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleLarge"
|
||||
|
||||
@ -11,69 +11,61 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qnext"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qnext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="next"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.943"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.104" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.188" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<!-- ScrollView füllt den Raum zwischen Frage und Buttons -->
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="360dp"
|
||||
android:layout_height="650dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.49"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:fillViewport="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.604">
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/question"
|
||||
app:layout_constraintBottom_toTopOf="@+id/Qnext"
|
||||
app:layout_constraintWidth_percent="0.9">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/CheckboxContainer"
|
||||
@ -82,4 +74,33 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp" />
|
||||
</ScrollView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -11,71 +11,100 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qnext"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qnext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="next"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.943"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/RadioGroup"
|
||||
android:layout_width="700dp"
|
||||
android:layout_height="900dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.501"
|
||||
<!-- SCROLLBEREICH für die Radio-Optionen:
|
||||
füllt den Platz zwischen Frage und Buttons, scrollt bei Bedarf -->
|
||||
<ScrollView
|
||||
android:id="@+id/radioScroll"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:fillViewport="true"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/question"
|
||||
app:layout_constraintBottom_toTopOf="@id/Qnext"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/question"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintWidth_percent="0.80">
|
||||
|
||||
<!-- Die RadioGroup bleibt gleich, ist jetzt aber scrollfähig -->
|
||||
<RadioGroup
|
||||
android:id="@+id/RadioGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp" />
|
||||
</ScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.104" />
|
||||
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textAlignment="center"
|
||||
android:textSize="40sp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.233" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -7,70 +7,85 @@
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/string_spinner"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="50dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.498"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintWidth_percent="0.70"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.38" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/question" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qnext"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qnext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="next"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.943"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.104" />
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.188" />
|
||||
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -7,69 +7,88 @@
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/value_spinner"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="50dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.498"
|
||||
app:layout_constraintHorizontal_bias="0.495"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.38" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/question"
|
||||
app:layout_constraintVertical_bias="0.027"
|
||||
app:layout_constraintWidth_percent="0.70" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qprev"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="previous"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.056"
|
||||
app:layout_constraintEnd_toStartOf="@id/Qnext"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Qnext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="70dp"
|
||||
android:autoSizeMaxTextSize="48sp"
|
||||
android:autoSizeMinTextSize="12sp"
|
||||
android:autoSizeStepGranularity="2sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:tag="next"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="30sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.943"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHeight_percent="0.07"
|
||||
app:layout_constraintStart_toEndOf="@id/Qprev"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.976" />
|
||||
app:layout_constraintVertical_bias="1.0"
|
||||
app:layout_constraintWidth_percent="0.30" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.104" />
|
||||
app:layout_constraintVertical_bias="0.051"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/question"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="40sp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHeight_percent="0.15"
|
||||
app:layout_constraintHorizontal_bias="0.512"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.188" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintWidth_percent="0.9" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
Reference in New Issue
Block a user