Xamarin C#:在水平 LinearLayout 内垂直居中 AXML 元素

Xamarin C#: center AXML elements vertically inside horizontal LinearLayout

我用 DialogBuilder 创建了一个 AlertDialog 并且我将 axml 文件的内容扩展为它的视图。我有一个嵌套 LinearLayouts 的两级系统,外部垂直定位另外两个有内容的系统。其中一个内容包含一个 TextView 和一个稍微缩小的 TimePicker。下面是对应axml的相关部分:

<LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:text="Start"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/textView2"
            android:gravity="center_vertical"/>
        <TimePicker
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:scaleX="0.80"
            android:scaleY="0.80"
            android:timePickerMode="spinner"
            android:id="@+id/endPicker" />
    </LinearLayout>

这是我智能手机上的样子(AM/PM 是我的母语):

文本 START 指的是一段时间的开始,我想将它垂直对齐到时间选择器的中心,如下所示(这是一张手动修改的图片):

但是,出于某种原因,无论我如何对齐文本,我都无法做到这一点。我已经尝试过 TableView 与建议的 类似的方法,但没有用。 I also tried to play with the margins of both elements but event when the picker was so "padded" that it was not visible, the text still remained at its position dispite being set to center_vertical. 我假设属于 TimePicker 的一些隐藏元素应该归咎于此,但我无法弄清楚是什么以及如何。我没有得到这里的东西是什么?

尝试将 TextView 中的重力场从 "center_vertical" 更改为 "center"

编辑:添加代码

<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <TextView
        android:text="Large Text"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:id="@+id/textView1"
        android:gravity="center" />
    <TimePicker
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:id="@+id/timePicker1" />
</LinearLayout>