GPTutor / app / src / main / res / layout / activity_question.xml
activity_question.xml
Raw
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:background="@drawable/background_secondary"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".ui.questions.QuestionActivity">

    <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

        <ImageButton
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:foreground="@drawable/ripple_foreground"
                android:drawableTint="#ff0000"

                android:id="@+id/previous"
                android:src="@drawable/baseline_back_24"
                android:onClick="onPreviousClicked"
                android:layout_marginTop="8dp"
                android:drawablePadding="3dp"
                android:background="@drawable/buttonshape_disabled"
                android:layout_alignParentTop="true"
                android:layout_alignParentStart="true"
                android:layout_marginStart="12dp" />

        <ImageButton
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:id="@+id/nextQ"
                android:foreground="@drawable/ripple_foreground"
                android:drawableTint="#ff0000"
                android:layout_alignParentEnd="true"
                android:src="@drawable/baseline_forward_24"
                android:onClick="onNextClicked"
                android:background="@drawable/buttonshape_disabled"
                android:layout_marginEnd="12dp"
                android:layout_marginTop="8dp"
                android:layout_alignParentTop="true" />

        <com.demarridosunmu.gptutor3.ui.MathView2
                android:layout_width="350dp"
                android:fontFamily="@font/sora_medium"
                android:layout_height="wrap_content"

                android:layout_marginStart="30dp"
                android:layout_marginEnd="30dp"
                android:layout_marginTop="60sp"
                android:text="@string/question_placeholder_latex"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:id="@+id/question"
                android:textColor="@color/text_primary"
                android:textSize="16sp"
                android:layout_centerHorizontal="true" />

        <!--    <TextView
                    android:layout_width="378dp"
                    android:layout_height="84dp"
                    android:layout_marginTop="100sp"
                    android:text="@string/question_placeholder"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    android:id="@+id/question"
                    android:textColor="@color/black"
                    android:textSize="18sp"
                    android:layout_marginStart="20sp" />-->
        <RelativeLayout
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/question"

                android:layout_centerHorizontal="true"
                android:layout_marginTop="20sp"
                android:id="@+id/relativeA">

            <androidx.appcompat.widget.AppCompatButton
                    android:layout_width="match_parent"
                    android:layout_height="44sp"
                    android:layout_gravity="center"
                    android:foreground="@drawable/ripple_foreground_2"

                    android:id="@+id/answer_a"
                    android:background="@color/button_primary"

                    app:setTextColor="@color/text_primary"

                    android:layout_centerHorizontal="true"
                    android:layout_marginTop="3sp"

                    android:elevation="0dp"

                    android:onClick="onAnswerAClicked"
                    android:clickable="true" />

            <com.demarridosunmu.gptutor3.ui.MathView2
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    
                    android:layout_alignBottom="@+id/answer_a"
                    android:layout_alignTop="@+id/answer_a"
                    app:setTextSize="12sp"
                    android:id="@+id/answer_a_latex"

                    android:layout_marginTop="11dp"
                    android:layout_marginStart="10dp"

                    android:elevation="2dp"

                    android:clickable="true"
                    app:setClickable="true"

                    android:background="@null"
                    android:textColor="@color/text_primary" />

            <androidx.appcompat.widget.AppCompatButton
                    android:layout_width="match_parent"
                    android:layout_height="44sp"
                    android:layout_gravity="center"
                    android:foreground="@drawable/ripple_foreground_2"
                    android:visibility="visible"

                    android:id="@+id/answer_b"
                    android:layout_below="@+id/answer_a"
                    android:background="@color/button_primary"

                    android:elevation="0dp"

                    app:setTextColor="@color/text_primary"

                    android:layout_centerHorizontal="true"

                    android:onClick="onAnswerBClicked"
                    android:clickable="true" />
            <View
                    android:layout_width="match_parent"
                    android:layout_height="2dp"
                    android:elevation="10dp"
                    android:outlineProvider="none"
                    android:background="@color/answer_border"
                    android:layout_above="@id/answer_a"/>
            <View
                    android:layout_width="match_parent"
                    android:layout_height="2dp"
                    android:elevation="10dp"
                    android:outlineProvider="none"
                    android:background="@color/answer_border"
                    android:layout_below="@id/answer_a"/>
            <com.demarridosunmu.gptutor3.ui.MathView2
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="11dp"
                    android:layout_marginStart="10dp"

                    android:elevation="2dp"
                    app:setTextSize="12sp"
                    android:clickable="true"
                    app:setClickable="true"

                    android:layout_alignBottom="@+id/answer_b"
                    android:layout_alignTop="@+id/answer_b"
                    android:id="@+id/answer_b_latex"

                    android:background="@null"
                    android:textColor="@color/text_primary" />

            <androidx.appcompat.widget.AppCompatButton
                    android:layout_width="match_parent"
                    android:layout_height="44sp"
                    android:layout_gravity="center"
                    android:foreground="@drawable/ripple_foreground_2"
                    android:id="@+id/answer_c"
                    android:layout_below="@+id/answer_b"
                    android:background="@color/button_primary"

                    app:setTextColor="@color/text_primary"

                    android:elevation="0dp"

                    android:layout_centerHorizontal="true"

                    android:onClick="onAnswerCClicked"
                    android:clickable="true" />
            <View
                    android:layout_width="match_parent"
                    android:layout_height="2dp"
                    android:elevation="10dp"
                    android:outlineProvider="none"
                    android:background="@color/answer_border"
                    android:layout_below="@id/answer_b"/>
            <com.demarridosunmu.gptutor3.ui.MathView2
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="11dp"
                    android:layout_marginStart="10dp"
                    app:setTextSize="12sp"
                    android:elevation="2dp"

                    android:clickable="true"
                    app:setClickable="true"

                    android:layout_alignBottom="@+id/answer_c"
                    android:layout_alignTop="@+id/answer_c"
                    android:id="@+id/answer_c_latex"

                    android:background="@null"
                    android:textColor="@color/text_primary" />

            <androidx.appcompat.widget.AppCompatButton
                    android:layout_width="match_parent"
                    android:layout_height="44sp"
                    android:layout_gravity="center"
                    android:foreground="@drawable/ripple_foreground_2"
                    android:id="@+id/answer_d"
                    android:layout_below="@+id/answer_c"
                    android:background="@color/button_primary"

                    android:elevation="0dp"

                    app:setTextColor="@color/text_primary"

                    android:layout_centerHorizontal="true"

                    android:onClick="onAnswerDClicked"
                    android:clickable="true" />
            <View
                    android:layout_width="match_parent"
                    android:layout_height="2dp"
                    android:elevation="10dp"
                    android:outlineProvider="none"
                    android:background="@color/answer_border"
                    android:layout_below="@id/answer_c"/>
            <com.demarridosunmu.gptutor3.ui.MathView2
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="11dp"
                    android:layout_marginStart="10dp"

                    android:elevation="2dp"
                    app:setTextSize="12sp"
                    android:clickable="true"
                    app:setClickable="true"

                    android:layout_alignBottom="@+id/answer_d"
                    android:layout_alignTop="@+id/answer_d"
                    android:id="@+id/answer_d_latex"

                    android:background="@null"
                    android:textColor="@color/text_primary" />

            <androidx.appcompat.widget.AppCompatButton
                    android:layout_width="match_parent"
                    android:layout_height="44dp"
                    android:layout_gravity="center"
                    android:foreground="@drawable/ripple_foreground_2"
                    android:id="@+id/answer_e"
                    android:layout_below="@+id/answer_d"
                    android:background="@color/button_primary"

                    android:elevation="0dp"
                    android:textSize="12sp"

                    app:setTextColor="@color/text_primary"

                    android:layout_centerHorizontal="true"

                    android:onClick="onAnswerEClicked"
                    android:clickable="true" />
            <View
                    android:layout_width="match_parent"
                    android:layout_height="2dp"
                    android:elevation="10dp"
                    android:outlineProvider="none"
                    android:background="@color/answer_border"
                    android:layout_below="@id/answer_d"/>
            <com.demarridosunmu.gptutor3.ui.MathView2
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="11dp"
                    android:layout_marginStart="10dp"

                    android:elevation="2dp"

                    android:clickable="true"
                    app:setClickable="true"


                    android:layout_alignBottom="@+id/answer_e"
                    android:layout_alignTop="@+id/answer_e"
                    android:id="@+id/answer_e_latex"

                    android:background="@null"
                    android:textColor="@color/text_primary" />

            <androidx.appcompat.widget.AppCompatButton
                    android:layout_width="110sp"
                    android:layout_height="40sp"
                    android:textSize="14sp"
                    android:foreground="@drawable/ripple_foreground"
                    android:text="@string/submit"
                    android:layout_below="@+id/answer_e"
                    android:fontFamily="@font/sora_medium"
                    android:background="@drawable/buttonshape_disabled"
                    android:id="@+id/submit"
                    app:setClickable="true"
                    android:layout_centerHorizontal="true"
                    android:textColor="@color/text_primary"
                    android:layout_marginTop="20sp"
                    android:onClick="onSubmitClicked" />


        </RelativeLayout>

        <com.demarridosunmu.gptutor3.ui.MathView2
                android:layout_width="440dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="30dp"
                android:layout_marginEnd="30dp"
                android:fontFamily="@font/sora_medium"
                android:layout_marginTop="20sp"
                android:text="@string/question_placeholder_latex"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:id="@+id/explanation"
                android:layout_below="@+id/relativeA"
                android:textColor="@color/text_primary"
                android:textSize="16sp"
                android:layout_marginBottom="10sp"
                android:layout_centerHorizontal="true" />

        <androidx.appcompat.widget.AppCompatButton
                android:layout_width="110sp"
                android:layout_height="40sp"
                android:textSize="14sp"
                android:text="@string/open_chat"
                android:layout_below="@+id/explanation"
                android:id="@+id/open_chat"
                android:fontFamily="@font/sora_medium"
                app:setClickable="true"
                android:layout_marginBottom="15sp"
                android:foreground="@drawable/ripple_foreground"
                android:layout_centerHorizontal="true"
                android:textColor="@color/text_primary"
                android:layout_marginTop="10sp"
                android:background="@drawable/buttonshape_secondary"

                android:onClick="onOpenChatClicked" />
    </RelativeLayout>
</ScrollView>