Almost every article on the topic of layering widgets leads to FrameLayouts, which are supposed to stack according to order of occurance in the XML. To test, I put a button and a TextView in the xml, hoping to see the TextView overlap the button. It doesn't matter if the button is placed before or after the textview, the button is always on top. Can anyone see what I'm doing wrong?
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.jdot.testloadingfragments.MainActivity">
<Button
android:id="@+id/btn_test"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:text=" "
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="----------------------------------------------------------"/>
</FrameLayout>