Q:

Android TabLayout not showing

I'm trying to create an app which uses three different tabs. I followed this video tutorial to get started: Youtube - Android Tab Tutorial [Android Studio Tab Fragments]
I built the app and checked it out on my phone. The three tabs show up and are working properly (I can switch between them).
I figured all I needed to do now was to add widgets to the different layouts, so I did that and re-built the app and tried it again. But it looks just the same. I don't see any of the controls I just added.
Here's the code:
SectionsPageAdapter:
public class SectionsPageAdapter extends FragmentPagerAdapter {

private final List<Fragment> mFragmentList = new ArrayList<>();
private final List<String> mFragmentTitleList = new ArrayList<>();

public void addFragment(Fragment fragment, String title){
    mFragmentList.add(fragment);
    mFragmentTitleList.add(title);
}

public SectionsPageAdapter(FragmentManager fm) {
    super(fm);
}

@Override
public CharSequence getPageTitle(int position) {
    return mFragmentTitleList.get(position);
}

@Override
public Fragment getItem(int position) {
    return mFragmentList.get(position);
}

@Override
public int getCount() {
    return mFragmentList.size();
}
}

Tab_Alarm:
public class Tab_Alarm extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.tab_alarm,container,false);

    return view;
}
}

MainActivity:
public class MainActivity extends AppCompatActivity {
private SectionsPageAdapter mSectionsPagerAdapter;
private ViewPager mViewPager;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mSectionsPagerAdapter = new SectionsPageAdapter(getSupportFragmentManager());
    mViewPager = (ViewPager) findViewById(R.id.container);
    setupViewPager(mViewPager);

    TabLayout tabLayout = (TabLayout)findViewById(R.id.tabs);
    tabLayout.setupWithViewPager(mViewPager);
}

private void setupViewPager(ViewPager viewPager){
    SectionsPageAdapter adapter = new SectionsPageAdapter(getSupportFragmentManager());
    adapter.addFragment(new Tab_Alarm(), "Alarm");
    adapter.addFragment(new Tab_Countdown(), "Countdown");
    adapter.addFragment(new Tab_Timer(), "Timer");
    viewPager.setAdapter(adapter);
}
}

I have one class for each Tab, but the all look the same (except the point at different xml files.)
Here's my xml file for the TabLayout which isn't showing up:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/Layout_Main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
    android:id="@+id/Layout_Container_List"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginBottom="8dp"
    android:layout_marginEnd="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    android:orientation="vertical"
    android:paddingBottom="25dp"
    android:paddingTop="25dp"
    app:layout_constraintBottom_toTopOf="@+id/Layout_Container_Buttons"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    tools:layout_constraintBottom_creator="1"
    tools:layout_constraintLeft_creator="1"
    tools:layout_constraintRight_creator="1"
    tools:layout_constraintTop_creator="1">

    <ListView
        android:id="@+id/ListView_AlarmList"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</LinearLayout>

<LinearLayout
    android:id="@+id/Layout_Container_Buttons"
    android:layout_width="0dp"
    android:layout_height="48dp"
    android:layout_marginBottom="8dp"
    android:layout_marginEnd="8dp"
    android:layout_marginStart="8dp"
    android:orientation="horizontal"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    tools:layout_constraintBottom_creator="1"
    tools:layout_constraintLeft_creator="1"
    tools:layout_constraintRight_creator="1">

    <Button
        android:id="@+id/btn_AddAlarm"
        style="?android:attr/borderlessButtonStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@string/add_alarm" />

    <Button
        android:id="@+id/btn_DeleteAlarm"
        style="?android:attr/borderlessButtonStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@string/delete_alarm" />

</LinearLayout>

All the tabs remain empty while running the app, despite one of them having stuff in it.

A:

I found out what the problem was, I'm posting it here in case someone else has the same problem:
I had changed the "default layout" of the fragment from Linear (vertical) to Constraint. Apparently whatever it is that receives the return data from onCreateView can't handle Constraint Layouts.
I changed it back to a Linear Layout and now it works.

