Buttons not Aligning correctly


#1

Hello there,
I’m on the last challenge, and I’m having problems aligning the previous and next buttons under the true and false buttons. I’ve tried playing around with the xml codes to no avail. Here’s the code for my layout:

[code]

[/code]

#2

Try:

1- Using a TableLayout and putting everything in TableRows.

2- Putting the prev button in a vertical LinearLayout with the button you want to align it with. Same for next button.


#3

You are very close. Think about how the true and false buttons line up horizontally. You just need to put your Prev/Next ImageButtons inside of another pair of tags, like this:

[code]

<TextView 
    android:id="@+id/question_text_view"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="24dp" />        

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >
    
    <Button
        android:id="@+id/true_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/true_button" />
    
    <Button
        android:id="@+id/false_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/false_button" />

</LinearLayout>

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >
    
 	<ImageButton
    android:id="@+id/prev_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/arrow_left"
    android:contentDescription="@string/move_back"
     />
    
	<ImageButton
    android:id="@+id/next_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/arrow_right"
    android:contentDescription="@string/move_forward"
    />

</LinearLayout>

[/code]