Я хотел бы создать пользовательский прямоугольник angular индикатор выполнения с белым цветом фона. В строке прогресса находится текст, который определяет высоту индикатора выполнения. Есть еще один вид с черным цветом фона, ширина которого увеличивается с левой стороны в зависимости от прогресса. У меня есть это, но это не работает:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:background="#FFFFFF" // this defines background colour
android:weightSum="1.0">
<LinearLayout // this should be aligned to the left side
android:layout_width="0dp"
android:layout_weight="0.25" // this should define percentage width
android:layout_height="fill_parent" // it should have height same as the TextView
android:background="#FF000000" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textSize="40dp"
android:gravity="center" // it should be displayed in the center of the progress bar
android:text="some text"/>
![enter image description here](https://i.stack.imgur.com/IUwcU.png)
РЕДАКТИРОВАТЬ: ОК, у меня есть это:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:background="#FFFFFFFF">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:gravity="left"
android:weightSum="1.0">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="0.25"
android:layout_height="fill_parent"
android:background="#FF000000" />
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#777777"
android:textSize="40dp"
android:gravity="center"
android:text="@{data.remainingTime}"/>
</RelativeLayout>
Единственная проблема: как указать LinearLayout точно так же высоко, как TextView?