[ad_1]
Asked
Viewed
9 times
I spent all day trying to figure out why my Intent wasn’t working, hours later it seems it’s not working because of my RadioGroup in my xml file… as soon as I cut it off (with the RadioButton(s)) it works.
What is the problem?
Here is my xml file :
<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=".GameQuestionsActivity"
tools:ignore="HardcodedText"
android:background="@drawable/background_color">
<TextView
android:id="@+id/first_quiz_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
tools:text="FIRST CLASS"
android:textSize="50dp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</TextView>
<TextView
android:id="@+id/timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="Time - 0"
android:textSize="20dp"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/first_quiz_title">
</TextView>
<TextView
android:id="@+id/first_quiz_question"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
tools:text="FIRST QUESTION ?"
android:textSize="20dp"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timer">
</TextView>
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/first_quiz_question"
app:layout_constraintVertical_bias="0.095">
<RadioButton
android:id="@+id/Button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="JE SAIS PAS"
android:textSize="16dp"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="244dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:padding="15dp"
android:background="@drawable/background_corner"/>
<RadioButton
android:id="@+id/Button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="JE SAIS PAS"
android:textSize="16dp"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="244dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:padding="15dp"
android:background="@drawable/background_corner"/>
<RadioButton
android:id="@+id/Button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="JE SAIS PAS"
android:textSize="16dp"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="244dp"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:padding="15dp"
android:background="@drawable/background_corner"/>
<RadioButton
android:id="@+id/Button4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="JE SAIS PAS"
android:textSize="16dp"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="244dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:padding="15dp"
android:background="@drawable/background_corner">
</RadioButton>
</RadioGroup>
<Button
android:layout_width="120dp"
android:layout_height="wrap_content"
android:backgroundTint="#A76FE8"
android:backgroundTintMode="@drawable/background_corner"
android:padding="10dp"
android:text="Next"
android:textSize="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/radioGroup">
</Button>
</androidx.constraintlayout.widget.ConstraintLayout>
2
default
[ad_2]