I am not very familiar with Xamarin. However, your weight setting has a possible error while you are setting up the width and height of the layout. If the parent layout is having a vertical orientation, you should not specify the height of the child layouts when you are specifying their heights by the weight attribute. Hence, if the parent layout orientation is vertical, the child layout you are referring to should look like the following.
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="center"
android:layout_weight="4">
Note that, I have set the android:layout_height
to 0dp
so that it takes the width specified by the weight.
On the other hand, if the parent layout orientation is horizontal, you should not specify the width of the child layout and hence set the width of the layout to 0dp
like the following.
<LinearLayout
android:orientation="horizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="4">
Hope that helps!