<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2017  STMicroelectronics – All rights reserved
  ~ The STMicroelectronics corporate logo is a trademark of STMicroelectronics
  ~
  ~ Redistribution and use in source and binary forms, with or without modification,
  ~ are permitted provided that the following conditions are met:
  ~
  ~ - Redistributions of source code must retain the above copyright notice, this list of conditions
  ~   and the following disclaimer.
  ~
  ~ - Redistributions in binary form must reproduce the above copyright notice, this list of
  ~   conditions and the following disclaimer in the documentation and/or other materials provided
  ~   with the distribution.
  ~
  ~ - Neither the name nor trademarks of STMicroelectronics International N.V. nor any other
  ~   STMicroelectronics company nor the names of its contributors may be used to endorse or
  ~   promote products derived from this software without specific prior written permission.
  ~
  ~ - All of the icons, pictures, logos and other images that are provided with the source code
  ~   in a directory whose title begins with st_images may only be used for internal purposes and
  ~   shall not be redistributed to any third party or modified in any way.
  ~
  ~ - Any redistributions in binary form shall not include the capability to display any of the
  ~   icons, pictures, logos and other images that are provided with the source code in a directory
  ~   whose title begins with st_images.
  ~
  ~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  ~ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  ~ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
  ~ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  ~ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  ~ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  ~ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  ~ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  ~ OF SUCH DAMAGE.
  -->

<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"
    tools:context="com.st.BlueMS.demos.EnvironmentalSensorsFragment">

    <android.support.constraint.Guideline
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/guidelineVerticalFirstQuarter"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.25" />
    <android.support.constraint.Guideline
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/guidelineVerticalCenter"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.5" />
    <android.support.constraint.Guideline
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/guidelineVerticalTherdQuarter"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.75" />

    <android.support.constraint.Guideline
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/guidelineHorizontal"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.5" />

    <ImageView
        android:id="@+id/thermometerImage"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:srcCompat="@drawable/temperature_icon"
        android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginTop="8dp"
        app:layout_constraintRight_toLeftOf="@+id/guidelineVerticalFirstQuarter"
        android:layout_marginRight="8dp"
        android:layout_marginBottom="8dp"
        app:layout_constraintBottom_toTopOf="@+id/guidelineHorizontal" />

    <TextView
        android:id="@+id/thermometerText"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="@string/sensorNotAvailable"
        android:textAlignment="center"
        android:textSize="22sp"
        app:layout_constraintBottom_toTopOf="@+id/guidelineHorizontal"
        app:layout_constraintLeft_toLeftOf="@+id/guidelineVerticalFirstQuarter"
        app:layout_constraintRight_toLeftOf="@+id/guidelineVerticalCenter"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/barometerImage"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@+id/guidelineVerticalFirstQuarter"
        app:layout_constraintTop_toTopOf="@+id/guidelineHorizontal"
        app:srcCompat="@drawable/pressure_icon" />

    <TextView
        android:id="@+id/barometerText"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="@string/sensorNotAvailable"
        android:textAlignment="center"
        android:textSize="22sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="@+id/guidelineVerticalFirstQuarter"
        app:layout_constraintRight_toLeftOf="@+id/guidelineVerticalCenter"
        app:layout_constraintTop_toTopOf="@+id/guidelineHorizontal" />

    <ImageView
        android:id="@+id/luminosityImage"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:srcCompat="@drawable/illuminance_icon"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginTop="8dp"
        android:layout_marginBottom="8dp"
        app:layout_constraintBottom_toTopOf="@+id/guidelineHorizontal"
        app:layout_constraintRight_toLeftOf="@+id/guidelineVerticalTherdQuarter"
        android:layout_marginRight="8dp"
        android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="@+id/guidelineVerticalCenter" />

    <TextView
        android:id="@+id/luminosityText"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="@string/sensorNotAvailable"
        android:textAlignment="center"
        android:textSize="22sp"
        app:layout_constraintBottom_toTopOf="@+id/guidelineHorizontal"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintLeft_toRightOf="@+id/luminosityImage"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/humidityImage"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="@+id/guidelineVerticalCenter"
        app:layout_constraintRight_toLeftOf="@+id/guidelineVerticalTherdQuarter"
        app:layout_constraintTop_toTopOf="@+id/guidelineHorizontal"
        app:srcCompat="@drawable/humidity_icon" />

    <TextView
        android:id="@+id/humidityText"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        android:text="@string/sensorNotAvailable"
        android:textAlignment="center"
        android:textSize="22sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="@+id/guidelineVerticalTherdQuarter"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@+id/guidelineHorizontal" />

</android.support.constraint.ConstraintLayout>

<!--
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.st.BlueMS.demos.EnvironmentalSensorsFragment" android:orientation="vertical">

<LinearLayout android:layout_height="match_parent"
              android:layout_width="match_parent"
              android:layout_weight="1"
              android:baselineAligned="false"
              android:orientation="horizontal">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="10dp"
        android:layout_marginEnd="10dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="20dp"
        android:orientation="horizontal"
        android:layout_weight="1">

        <ImageView
            android:id="@+id/thermometerImage"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center|start"
            android:layout_marginEnd="20dp"
            android:layout_weight="1"
            app:srcCompat="@drawable/temperature_icon" />

        <TextView

            android:id="@+id/thermometerText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="end|center_vertical"
            android:layout_weight="1"
            android:gravity="center"
            android:text="@string/sensorNotAvailable"
            android:textSize="22sp"/>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="10dp"
        android:layout_marginEnd="20dp"
        android:layout_marginStart="10dp"
        android:layout_marginTop="20dp"
        android:orientation="horizontal"
        android:layout_weight="1">

        <ImageView
            android:id="@+id/luminosityImage"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center|start"
            android:layout_marginEnd="20dp"
            android:layout_weight="0.8"
            app:srcCompat="@drawable/illuminance_icon"/>

        <TextView
            android:id="@+id/luminosityText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="end|center_vertical"
            android:layout_weight="1"
            android:gravity="center"
            android:text="@string/sensorNotAvailable"
            android:textSize="22sp"/>

    </LinearLayout>
</LinearLayout>
    <LinearLayout android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_weight="1">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="20dp"
        android:layout_marginEnd="10dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="10dp"
        android:orientation="horizontal"
        android:layout_weight="1">

        <ImageView
            android:id="@+id/barometerImage"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_marginEnd="20dp"
            android:layout_weight="1"
            app:srcCompat="@drawable/pressure_icon"/>

        <TextView
            android:id="@+id/barometerText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="end|center_vertical"
            android:gravity="center"
            android:text="@string/sensorNotAvailable"
            android:layout_weight="1"
            android:textSize="22sp"/>

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="20dp"
        android:layout_marginEnd="20dp"
        android:layout_marginStart="10dp"
        android:layout_marginTop="10dp"
        android:layout_weight="1"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/humidityImage"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center|start"
            android:layout_marginEnd="20dp"
            android:layout_weight="0.8"
            app:srcCompat="@drawable/humidity_icon"/>

        <TextView
            android:id="@+id/humidityText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="end|center_vertical"
            android:layout_weight="1"
            android:gravity="center"
            android:text="@string/sensorNotAvailable"
            android:textSize="22sp"/>

    </LinearLayout>
    </LinearLayout>
</LinearLayout>
    -->