Layout :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="20dp">
<ProgressBar
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_centerInParent="true"
android:layout_width="15dp"
android:layout_height="match_parent"
android:max="100"
android:progress="33"
android:progressDrawable="@drawable/progress_drawable" />
</RelativeLayout>
progress_drawable :
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<color android:color="#777" />
</item>
<item android:id="@android:id/progress">
<clip
android:clipOrientation="vertical"
android:gravity="bottom">
<shape>
<gradient
android:startColor="#00FF00"
android:centerColor="#FFFF00"
android:endColor="#FF0000"
android:angle="90" />
</shape>
</clip>
</item>
</layer-list>
нужно что бы один показывал фактическую температуру, а тот который сзади заданную
<?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:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="asv_lab.ru.smarttemp.MainActivity"
tools:showIn="@layout/main">
<GridLayout
android:id="@+id/gridmain"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:alignmentMode="alignMargins"
android:columnCount="4"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ProgressBar
android:id="@+id/prg0"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="10"
android:layout_column="1"
android:layout_row="1"
android:max="100"
android:progress="33"
android:progressDrawable="@drawable/prgbarv1" />
<ProgressBar
android:id="@+id/prg1"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_column="1"
android:layout_gravity="center"
android:layout_row="1"
android:layout_weight="0.5"
android:max="100"
android:progress="34"
android:progressDrawable="@drawable/prgbarv" />
<EditText
android:id="@+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_row="2"
android:ems="3"
android:inputType="number" />
</GridLayout>
</android.support.constraint.ConstraintLayout>