This is because you are giving margin to the View
which was way too much to fit in the area.That is why your center View
was not visible.Replace your center View
with the below View
code.This works for me, hope it works for you too
eg.
<View
android:id="@+id/center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/bottom"
android:layout_below="@id/top"
android:layout_gravity="center"
android:layout_toLeftOf="@+id/right"
android:layout_toRightOf="@+id/left"
android:background="@drawable/border_red" />