I’m a noob to android development and I am trying to place buttons on top of a FlakeView from the 9 Old Androids library. As I am using a Frame Layout to place the buttons above the Layout containing the FlakeView. However, when I run the app the buttons show behind the flakes, instead of in front of them. I used Frame Layout before to accomplish this without any problems, so i don’t understand whi it isn’t working now. Any help is greatly appreciated.
Layout
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="More"
android:id="@+id/more"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Less"
android:id="@+id/less"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Game"
android:id="@+id/newgame"/>
</LinearLayout>
<LinearLayout
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical">
</LinearLayout>
</FrameLayout>
You have your layout organized backwards for what you are trying to accomplish. Do the following: