Commit a87f7806 authored by Antonia Wüst's avatar Antonia Wüst

update privacy policy part

parent eb36974c
......@@ -18,13 +18,14 @@ class DSEStepperAdapter(fm: FragmentManager, context: Context) : AbstractFragmen
3 -> Page4Fragment()
4 -> Page5Fragment()
5 -> Page6Fragment()
6 -> Page7Fragment()
6 -> Page8Fragment()
7 -> Page7Fragment()
else -> Page1Fragment()
}
}
override fun getCount(): Int {
return 7
return 8
}
override fun getViewModel(position: Int): StepViewModel {
......@@ -49,6 +50,9 @@ class DSEStepperAdapter(fm: FragmentManager, context: Context) : AbstractFragmen
.setEndButtonLabel(context.getString(R.string.dse_stepper_next))
.setBackButtonLabel(context.getString(R.string.dse_stepper_back))
6 -> builder
.setEndButtonLabel(context.getString(R.string.dse_stepper_next))
.setBackButtonLabel(context.getString(R.string.dse_stepper_back))
7 -> builder
.setBackButtonLabel(context.getString(R.string.dse_stepper_back))
.setEndButtonVisible(false)
else -> throw IllegalArgumentException("Unsupported position: $position")
......
package de.akamu.tudarmstadt.features.dse
import android.os.Bundle
import android.text.method.LinkMovementMethod
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Switch
import androidx.fragment.app.Fragment
import com.stepstone.stepper.Step
import com.stepstone.stepper.VerificationError
import de.akamu.tudarmstadt.R
import android.widget.TextView
import androidx.preference.PreferenceManager
import com.google.firebase.crashlytics.FirebaseCrashlytics
import de.akamu.tudarmstadt.util.Constants
import java.lang.RuntimeException
class Page8Fragment : Fragment(), Step {
lateinit var thisView: View
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
thisView = inflater.inflate(R.layout.fragment_page8, container, false)
val textViewPrivacyPolicy: TextView = thisView.findViewById(R.id.dse_page8_pp)
textViewPrivacyPolicy.movementMethod = LinkMovementMethod.getInstance()
return thisView
}
fun setCrashlytics(isEnabled: Boolean) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(isEnabled)
PreferenceManager.getDefaultSharedPreferences(activity).edit()
.putBoolean(Constants.BUG_REPORTS_ENABLED_KEY, isEnabled).apply()
}
override fun onSelected() {
}
override fun verifyStep(): VerificationError? {
// Set crashlytic setting
val switch = thisView.findViewById<Switch>(R.id.switch_crashlytics)
setCrashlytics(switch.isChecked)
return null
}
override fun onError(error: VerificationError) {
}
}
\ No newline at end of file
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
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">
<TextView
android:text="@string/dse_page1_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page1_title"
android:textSize="22sp" android:textStyle="bold" android:textAllCaps="false"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginTop="8dp"
app:layout_constraintHorizontal_bias="0.0" android:textColor="@color/darkText"/>
<TextView
android:text="@string/dse_page_question"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp"
android:textAlignment="viewStart" android:id="@+id/dse_page_question"
android:textSize="18sp" android:textAllCaps="false" android:paddingLeft="10dp"
android:paddingRight="10dp" android:layout_marginTop="24dp"
app:layout_constraintTop_toBottomOf="@+id/dse_page1_title" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<TextView
android:layout_width="364dp"
android:layout_height="wrap_content" android:id="@+id/dse_page1_overview"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:text="@string/dse_page1_overview" android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="16dp" app:layout_constraintTop_toBottomOf="@+id/dse_page_question"/>
<TextView
android:layout_width="match_parent"
android:layout_height="93dp" android:id="@+id/dse_page1_consent"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp"
android:paddingStart="10dp" android:paddingEnd="10dp" android:paddingTop="5dp"
android:textAlignment="viewStart" android:text="@string/dse_page1_consent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"/>
<Button
android:text="@string/dse_page1_decline_button"
android:layout_width="340dp"
android:layout_height="47dp" android:id="@+id/dse_page1_decline_button"
style="@style/AppButtonBorders"
android:layout_marginBottom="24dp"
app:layout_constraintBottom_toTopOf="@+id/dse_page1_consent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_margin="10dp"
android:padding="0dp"
android:layout_marginStart="8dp" android:layout_marginEnd="8dp" android:layout_marginTop="24dp"
app:layout_constraintTop_toBottomOf="@+id/dse_page1_overview"/>
<Button
android:text="@string/dse_page1_skip_buttom"
android:layout_width="83dp"
android:layout_height="37dp"
android:id="@+id/dse_page1_skip_buttom"
app:layout_constraintEnd_toEndOf="@+id/dse_page1_title" android:layout_marginEnd="8dp"
style="@style/AppButtonBorders"
android:textSize="14sp"
android:padding="0dp"
android:layout_marginTop="16dp" app:layout_constraintTop_toTopOf="parent" android:onClick="moveToLastPage"/>
<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"
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_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_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
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingTop="16dp"
android:paddingRight="8dp">
<TextView
android:text="@string/dse_page2_email_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page2_email_title"
android:textSize="18sp" android:textAllCaps="false"
android:textColor="@color/darkText"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp"
android:textAlignment="viewStart" android:id="@+id/dse_page2_email_question" android:textSize="16sp"
android:text="@string/dse_page2_email_question"
android:clickable="true"
android:focusable="true"
android:textStyle="bold" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page2_email_text" android:textSize="18sp"
android:text="@string/dse_page2_email_text"
android:clickable="true"
android:focusable="true"
android:textAllCaps="false"/>
<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:text="@string/dse_page2_username_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page2_username_title"
android:textSize="18sp" android:textAllCaps="false" android:textColor="@color/darkText"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp"
android:textAlignment="viewStart" android:id="@+id/dse_page2_username_question" android:textSize="16sp"
android:text="@string/dse_page2_username_question"
android:clickable="true"
android:focusable="true"
android:textStyle="bold" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page2_username_text" android:textSize="18sp"
android:text="@string/dse_page2_username_text"
android:clickable="true"
android:focusable="true"
android:textAllCaps="false"/>
<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_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_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_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" />
<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_username_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="@color/textLight"
android:lineSpacingExtra="2sp"
android:padding="10dp"
android:text="@string/dse_page2_username_title"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textSize="18sp" />
<TextView
android:id="@+id/dse_page2_username_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_username_question"
android:textAlignment="viewStart"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/dse_page2_username_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_username_text"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textSize="18sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="8dp"
android:paddingTop="16dp"
android:paddingEnd="8dp">
<TextView
android:text="@string/dse_page3_university_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page3_university_title"
android:textSize="18sp" android:textAllCaps="false" android:textColor="@color/darkText"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp"
android:textAlignment="viewStart" android:id="@+id/dse_page3_university_question" android:textSize="16sp"
android:text="@string/dse_page3_university_question"
android:clickable="true"
android:focusable="true"
android:textStyle="bold" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page3_university_text" android:textSize="18sp"
android:text="@string/dse_page3_university_text"
android:clickable="true"
android:focusable="true"
android:textAllCaps="false"/>
<View
android:id="@+id/divider2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
/>
<TextView
android:text="@string/dse_page3_semester_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page3_semester_title"
android:textSize="18sp" android:textColor="@color/darkText"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp"
android:textAlignment="viewStart" android:id="@+id/dse_page3_semester_question" android:textSize="16sp"
android:text="@string/dse_page3_semester_question"
android:clickable="true"
android:focusable="true"
android:textStyle="bold" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page3_semester_text" android:textSize="18sp"
android:text="@string/dse_page3_semester_text"
android:clickable="true"
android:focusable="true"
/>
<View
android:id="@+id/divider3"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
/>
<TextView
android:text="@string/dse_page3_other_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp" android:padding="10dp"
android:textAlignment="viewStart" android:id="@+id/dse_page3_other_title"
android:textSize="16sp" android:textColor="@color/darkText"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_light" android:lineSpacingExtra="2sp"
android:paddingStart="10dp" android:paddingEnd="10dp"
android:textAlignment="viewStart" android:textSize="15sp"
android:text="@string/dse_page3_other_text"
android:clickable="true"
android:focusable="true"
android:id="@+id/dse_page3_other_text"/>
<TextView
android:id="@+id/dse_page2_title2"
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_page3_university_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_page3_university_title"
android:textAlignment="viewStart"
android:textAllCaps="false"
android:textColor="@color/textLight"
android:textSize="18sp" />
<TextView
android:id="@+id/dse_page3_university_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_page3_university_question"
android:textAlignment="viewStart"
android:textColor="@color/textLight"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/dse_page3_university_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:lineSpacingExtra="2sp"
android:padding="10dp"