Question: ```
static void just_traverse(sll **head_ref) {
    sll *first = *head_ref;
    sll *second = (*head_ref)->next;

    if(second == NULL) {
            return;
    }

    just_traverse(&(second));
    *head_ref = second;
    printf("%d \t",second->payload);
}

```

In above code if I remove \*head\_ref = second; I get output with respect to stack however If I put this line \*head\_ref = second; It always print last element say {4,3,2,1} then it always prints 1?Can anybody explain why?

Answer: 
Firstly, you should be using `RelativeLayout`; [`FrameLayout`](http://developer.android.com/reference/android/widget/FrameLayout.html) is used to hold a single child element optimally.

Second, the layout is drawn in order from top to bottom -> back to front. Therefore you want your `Button` below it in the XML file.

Lastly, instead of `gravity` you should be using `align`.

```
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Large Text"
            android:textAppearance="?android:attr/textAppearanceLarge" />
        <ListView 
            android:id="@+id/listView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">

        </ListView>
    </LinearLayout>

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true"
        android:text="Button" />

</RelativeLayout>

```
Just copy paste this. Tested solution.

```
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="horizontal"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_weight="3">

<LinearLayout
    android:id="@+id/linearLayout"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
 >

    <Button
        android:text="Status"
        android:textSize="20sp"
        android:textStyle="bold"
        style="?android:attr/buttonBarButtonStyle"
        android:gravity="center"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:textColor="@color/black"
        android:layout_height="wrap_content"
        android:id="@+id/textView10" />

    <Button
        android:text="Date"
        android:textSize="20sp"
        android:textStyle="bold"
        style="?android:attr/buttonBarButtonStyle"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:textColor="@color/black"
        android:layout_height="wrap_content"
        android:id="@+id/textView6"
        />

    <Button
        android:text="Subject"
        android:textSize="20sp"
        android:textStyle="bold"
        android:gravity="center"
        style="?android:attr/buttonBarButtonStyle"
        android:textColor="@color/black"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:id="@+id/textView9"

        />

</LinearLayout>

<ListView
    android:id="@+id/list"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_below="@+id/linearLayout"
/>

  </RelativeLayout>

```