Quero fazer uma lista de perguntas sem ter que repetir todo o código em xml. Por exemplo:
<TextView
android:id="@+id/pergunta1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="Insira a pergunta aqui: "
android:textColor="#000"
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.04000002" />
<EditText
android:id="@+id/observacao"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_margin="8dp"
android:layout_weight="1"
android:hint="Observações"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/radioGroup1"
app:layout_constraintVertical_bias="0.0" />
<RadioGroup
android:id="@+id/radioGroup1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pergunta1"
app:layout_constraintVertical_bias="0.04000002">
<RadioButton
android:id="@+id/conforme1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Conforme"
android:textSize="12sp" />
<RadioButton
android:id="@+id/nConforme1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Não Conforme"
android:textSize="12sp" />
<RadioButton
android:id="@+id/nSeAplica1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Não se aplica"
android:textSize="12sp" />
</RadioGroup>
Então repito esse código pra fazer a pergunta 2. E como faço para colocar o scroll?