<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2018-2020 DJI
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  ~
  -->

<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_left"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_begin="@dimen/uxsdk_telemetry_item_padding"
        app:layout_constraintLeft_toLeftOf="parent" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_top"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_begin="@dimen/uxsdk_telemetry_item_padding"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_right"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_end="@dimen/uxsdk_telemetry_item_padding"
        app:layout_constraintRight_toRightOf="parent" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_bottom"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintGuide_end="@dimen/uxsdk_telemetry_item_padding" />

    <TextView
        android:id="@+id/text_view_label"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_marginLeft="@dimen/uxsdk_telemetry_view_margin"
        android:layout_marginRight="@dimen/uxsdk_telemetry_view_margin"
        android:gravity="center"
        android:shadowColor="@color/uxsdk_black_40_percent"
        android:shadowDx="0"
        android:shadowDy="2"
        android:shadowRadius="4"
        android:textColor="@color/uxsdk_white_60_percent"
        app:layout_constraintBottom_toTopOf="@id/guideline_bottom"
        app:layout_constraintHorizontal_chainStyle="spread"
        app:layout_constraintLeft_toRightOf="@id/guideline_left"
        app:layout_constraintRight_toLeftOf="@+id/text_view_value"
        app:layout_constraintTop_toBottomOf="@id/guideline_top" />

    <TextView
        android:id="@+id/text_view_value"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_marginLeft="@dimen/uxsdk_telemetry_view_margin"
        android:layout_marginRight="@dimen/uxsdk_telemetry_view_margin"
        android:gravity="center"
        android:shadowColor="@color/uxsdk_black_40_percent"
        android:shadowDx="0"
        android:shadowDy="2"
        android:shadowRadius="4"
        android:textColor="@color/uxsdk_white"
        android:maxLines="1"
        app:layout_constraintBottom_toTopOf="@id/guideline_bottom"
        app:layout_constraintHorizontal_chainStyle="spread"
        app:layout_constraintLeft_toRightOf="@+id/text_view_label"
        app:layout_constraintRight_toLeftOf="@+id/text_view_unit"
        app:layout_constraintTop_toBottomOf="@id/guideline_top" />

    <TextView
        android:id="@+id/text_view_unit"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_marginLeft="@dimen/uxsdk_telemetry_view_margin"
        android:layout_marginRight="@dimen/uxsdk_telemetry_view_margin"
        android:gravity="center_vertical|start"
        android:shadowColor="@color/uxsdk_black_40_percent"
        android:shadowDx="0"
        android:shadowDy="2"
        android:shadowRadius="4"
        android:textColor="@color/uxsdk_white"
        app:layout_constraintBottom_toTopOf="@id/guideline_bottom"
        app:layout_constraintLeft_toRightOf="@+id/text_view_value"
        app:layout_constraintRight_toLeftOf="@+id/guideline_right"
        app:layout_constraintTop_toBottomOf="@id/guideline_top" />

</merge>