Commit 3ae1a11d authored by Niklas Fix's avatar Niklas Fix 🎓

fix privacy policy styles and add scroll view

parent a64825bb
......@@ -40,14 +40,14 @@ class Page1Fragment : Fragment(), Step {
}
private fun showDeclineDialog(){
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setTitle(getString(R.string.dse_page1_decline_popup_title))
dialog.setMessage(getString(R.string.dse_page1_decline_popup_text))
dialog.show()
}
private fun showConsentDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setTitle(getString(R.string.dse_page1_consent_popup_title))
dialog.setMessage(getString(R.string.dse_page1_consent_popup_text))
dialog.show()
......
......@@ -25,7 +25,7 @@ class Page4Fragment : Fragment(), Step {
}
private fun showMethodDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setTitle(getString(R.string.dse_page4_method_popup_title))
dialog.setMessage(getText(R.string.dse_page4_method_popup_text))
dialog.show()
......
......@@ -63,43 +63,43 @@ class Page5Fragment : Fragment(), Step {
}
private fun showRevokeDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getString(R.string.dse_page5_revoke_popup_text))
dialog.show()
}
private fun showRequestDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getString(R.string.dse_page5_information_popup_text))
dialog.show()
}
private fun showTransferDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getString(R.string.dse_page5_transfer_popup_text))
dialog.show()
}
private fun showRestrictDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getString(R.string.dse_page5_restriction_popup_text))
dialog.show()
}
private fun showDeleteDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getString(R.string.dse_page5_delete_popup_text))
dialog.show()
}
private fun showComplainDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getString(R.string.dse_page5_complain_popup_text))
dialog.show()
}
private fun showCorrectDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getText(R.string.dse_page5_correct_popup))
dialog.show()
}
......
......@@ -45,14 +45,14 @@ class Page7Fragment : Fragment(), Step {
}
private fun showDeclineDialog(){
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setTitle(getString(R.string.dse_page7_decline_popup_title))
dialog.setMessage(getString(R.string.dse_page7_decline_popup_text))
dialog.show()
}
private fun showConsentDialog() {
val dialog = AlertDialog.Builder(context, R.style.DialogStyle).create()
val dialog = AlertDialog.Builder(context, R.style.DialogStylePrivacyPolicy).create()
dialog.setMessage(getText(R.string.dse_page7_popup_text))
dialog.show()
}
......
......@@ -11,6 +11,7 @@ import com.stepstone.stepper.Step
import com.stepstone.stepper.VerificationError
import de.akamu.tudarmstadt.R
import android.widget.TextView
import androidx.appcompat.widget.SwitchCompat
import androidx.preference.PreferenceManager
import com.google.firebase.crashlytics.FirebaseCrashlytics
import de.akamu.tudarmstadt.util.Constants
......@@ -44,7 +45,7 @@ class Page8Fragment : Fragment(), Step {
override fun verifyStep(): VerificationError? {
// Set crashlytic setting
val switch = thisView.findViewById<Switch>(R.id.switch_crashlytics)
val switch = thisView.findViewById<SwitchCompat>(R.id.switch_crashlytics)
setCrashlytics(switch.isChecked)
return null
}
......
package de.akamu.tudarmstadt.features.signup
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.os.Message
import android.view.MotionEvent
import android.view.View
import androidx.lifecycle.ViewModelStore
import android.view.inputmethod.InputMethodManager
import com.stepstone.stepper.StepperLayout
import com.stepstone.stepper.VerificationError
import de.akamu.tudarmstadt.BaseActivity
......
package de.akamu.tudarmstadt.features.signup.username
import android.app.Activity
import android.content.Context
import android.os.AsyncTask
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
......
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="de.akamu.tudarmstadt.features.signup.SignupActivity">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="de.akamu.tudarmstadt.features.signup.SignupActivity">
<ProgressBar
android:id="@+id/progressbar_signupactivity_loading"
style="?android:attr/progressBarStyleLarge"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ProgressBar
android:id="@+id/progressbar_signupactivity_loading"
style="?android:attr/progressBarStyleLarge"
android:layout_width="40dp"
android:layout_height="40dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.stepstone.stepper.StepperLayout
android:id="@+id/stepperlayout_signupactivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:ms_stepperType="dots"
app:ms_showErrorStateEnabled ="true"
app:ms_showErrorMessageEnabled="true"
app:ms_bottomNavigationBackground="@color/colorPrimary"
app:ms_backButtonColor="@color/white"
app:ms_nextButtonColor="@color/white"
app:ms_completeButtonColor="@color/white"
app:ms_activeStepColor="@color/akamu_yellow"
app:ms_inactiveStepColor="@color/white">
</com.stepstone.stepper.StepperLayout>
<com.stepstone.stepper.StepperLayout
android:id="@+id/stepperlayout_signupactivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:ms_activeStepColor="@color/akamu_yellow"
app:ms_backButtonColor="@color/white"
app:ms_bottomNavigationBackground="@color/colorPrimary"
app:ms_completeButtonColor="@color/white"
app:ms_inactiveStepColor="@color/white"
app:ms_nextButtonColor="@color/white"
app:ms_showErrorMessageEnabled="true"
app:ms_showErrorStateEnabled="true"
app:ms_stepperType="dots"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:background="@color/white"
android:fillViewport="true">
<TextView
android:id="@+id/dse_page1_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page1_title"
android:textAllCaps="false"
android:textColor="@color/textLight"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/dse_page_question"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="32dp"
android:lineSpacingExtra="2sp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/dse_page_question"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="@color/textLight"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dse_page1_title" />
android:layout_height="wrap_content">
<TextView
android:id="@+id/dse_page1_overview"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="32dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page1_overview"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dse_page_question" />
<TextView
android:id="@+id/dse_page1_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page1_title"
android:textAllCaps="false"
android:textColor="@color/textLight"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/dse_page1_crashlytics"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="32dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page1_crashlytics"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dse_page1_overview" />
<TextView
android:id="@+id/dse_page_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="32dp"
android:lineSpacingExtra="2sp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/dse_page_question"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="@color/textLight"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dse_page1_title" />
<TextView
android:id="@+id/dse_page1_consent"
android:layout_width="match_parent"
android:layout_height="93dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="32dp"
android:clickable="true"
android:focusable="true"
android:lineSpacingExtra="2sp"
android:paddingStart="10dp"
android:paddingTop="5dp"
android:paddingEnd="10dp"
android:text="@string/dse_page1_consent"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/dse_page1_overview"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="32dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page1_overview"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dse_page_question" />
<TextView
android:id="@+id/dse_page1_crashlytics"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="32dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page1_crashlytics"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dse_page1_overview" />
<TextView
android:id="@+id/dse_page1_consent"
android:layout_width="match_parent"
android:layout_height="93dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="32dp"
android:clickable="true"
android:focusable="true"
android:lineSpacingExtra="2sp"
android:paddingStart="10dp"
android:paddingTop="5dp"
android:paddingEnd="10dp"
android:text="@string/dse_page1_consent"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/dse_page1_decline_button"
style="@style/AppButtonBorders"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="24dp"
android:padding="0dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/dse_page1_decline_button"
app:layout_constraintBottom_toTopOf="@+id/dse_page1_consent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/dse_page1_decline_button"
style="@style/AppButtonBorders"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="24dp"
android:padding="0dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/dse_page1_decline_button"
app:layout_constraintBottom_toTopOf="@+id/dse_page1_consent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/dse_page1_skip_buttom"
style="@style/AppButtonBorders"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:onClick="moveToLastPage"
android:padding="0dp"
android:text="@string/dse_page1_skip_buttom"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@+id/dse_page1_title"
app:layout_constraintEnd_toEndOf="@+id/dse_page1_title"
app:layout_constraintTop_toTopOf="@+id/dse_page1_title" />
<Button
android:id="@+id/dse_page1_skip_buttom"
style="@style/AppButtonBorders"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:onClick="moveToLastPage"
android:padding="0dp"
android:text="@string/dse_page1_skip_buttom"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@+id/dse_page1_title"
app:layout_constraintEnd_toEndOf="@+id/dse_page1_title"
app:layout_constraintTop_toTopOf="@+id/dse_page1_title" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingTop="16dp"
android:paddingRight="8dp">
android:background="@color/white"
android:fillViewport="true">
<TextView
android:id="@+id/dse_page2_title"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page2_title"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="24sp"
android:textStyle="bold" />
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingTop="16dp"
android:paddingRight="8dp">
<TextView
android:id="@+id/dse_page2_email_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page2_email_title"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="@color/textLight"
android:textSize="18sp" />
<TextView
android:id="@+id/dse_page2_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page2_title"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
android:id="@+id/dse_page2_email_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:textColor="@color/textLight"
android:lineSpacingExtra="2sp"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:text="@string/dse_page2_email_question"
android:textAlignment="viewStart"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/dse_page2_email_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page2_email_title"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="@color/textLight"
android:textSize="18sp" />
<TextView
android:id="@+id/dse_page2_email_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:textColor="@color/textLight"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page2_email_text"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textSize="18sp" />
<TextView
android:id="@+id/dse_page2_email_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:lineSpacingExtra="2sp"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:paddingRight="10dp"
android:text="@string/dse_page2_email_question"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="18sp"
android:textStyle="bold" />
<View
android:id="@+id/divider4"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="8dp"
android:background="?android:attr/listDivider" />
<TextView
android:id="@+id/dse_page2_email_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"