Add scroll view to environment sensor fragment.
This commit is contained in:
parent
18dd554dc4
commit
0a5a59fdb6
1 changed files with 199 additions and 193 deletions
|
@ -6,214 +6,220 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.sensors.SensorsFragment">
|
tools:context=".ui.sensors.SensorsFragment">
|
||||||
<androidx.cardview.widget.CardView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent"
|
android:layout_height="match_parent" app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
android:id="@+id/cardView" android:layout_margin="5dp">
|
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||||
<LinearLayout
|
android:orientation="vertical">
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" android:gravity="center">
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="272dp"
|
|
||||||
android:layout_height="268dp" tools:src="@tools:sample/avatars"
|
|
||||||
android:id="@+id/sensorStatusImageView"
|
|
||||||
android:layout_marginEnd="70dp"
|
|
||||||
android:layout_marginStart="70dp"
|
|
||||||
android:contentDescription="@string/environment_status_description"
|
|
||||||
android:background="#00FFFFFF"
|
|
||||||
android:tooltipText="what is this amaaaizng"
|
|
||||||
android:layout_marginTop="90dp" app:srcCompat="@drawable/status_neutral"
|
|
||||||
tools:srcCompat="@drawable/status_neutral" android:adjustViewBounds="true"
|
|
||||||
android:scaleType="center"
|
|
||||||
/>
|
|
||||||
<com.google.android.material.chip.Chip
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" android:id="@+id/sensorStatusChip"
|
|
||||||
android:layout_marginEnd="30dp" android:layout_marginStart="30dp" android:textAlignment="center"
|
|
||||||
tools:text="Sensor Status Explain" android:textStyle="bold" android:layout_marginTop="15dp"
|
|
||||||
android:layout_marginBottom="15dp" android:clickable="false"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="409dp"
|
|
||||||
android:layout_height="294dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
android:id="@+id/linearLayout"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cardView">
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="195dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" android:layout_margin="5dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/cardView" android:layout_margin="5dp">
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" android:gravity="center">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="272dp"
|
||||||
|
android:layout_height="268dp" tools:src="@tools:sample/avatars"
|
||||||
|
android:id="@+id/sensorStatusImageView"
|
||||||
|
android:layout_marginEnd="70dp"
|
||||||
|
android:layout_marginStart="70dp"
|
||||||
|
android:contentDescription="@string/environment_status_description"
|
||||||
|
android:background="#00FFFFFF"
|
||||||
|
android:tooltipText="what is this amaaaizng"
|
||||||
|
android:layout_marginTop="0dp" app:srcCompat="@drawable/status_neutral"
|
||||||
|
tools:srcCompat="@drawable/status_neutral" android:adjustViewBounds="true"
|
||||||
|
android:scaleType="center"
|
||||||
|
/>
|
||||||
|
<com.google.android.material.chip.Chip
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" android:id="@+id/sensorStatusChip"
|
||||||
|
android:layout_marginEnd="30dp" android:layout_marginStart="30dp"
|
||||||
|
android:textAlignment="center"
|
||||||
|
tools:text="Sensor Status Explain" android:textStyle="bold" android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginBottom="15dp" android:clickable="false"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="409dp"
|
||||||
|
android:layout_height="294dp"
|
||||||
|
android:id="@+id/linearLayout"
|
||||||
>
|
>
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
<ImageView
|
|
||||||
android:src="@drawable/thermometer"
|
|
||||||
android:layout_width="55dp"
|
|
||||||
android:layout_height="52dp" android:id="@+id/envSensorTempImg"
|
|
||||||
android:adjustViewBounds="false"
|
|
||||||
android:contentDescription="@string/temperature_icon_desc" android:cropToPadding="false"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:layout_marginStart="29dp"
|
|
||||||
android:layout_marginTop="21dp"/>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="29dp"
|
|
||||||
android:layout_marginTop="21dp"
|
|
||||||
android:layout_marginBottom="25dp"
|
|
||||||
>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="55dp"
|
|
||||||
android:layout_height="26dp" android:id="@+id/envSensorTempText"
|
|
||||||
android:gravity="center" android:foregroundGravity="center"
|
|
||||||
android:backgroundTint="#00FFFEFE"
|
|
||||||
android:clickable="false" android:drawableTint="#00FFFFFF"
|
|
||||||
android:textStyle="bold" android:textColor="#000000"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="10000"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/temp_sensor_unit"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" android:id="@+id/envSensorTempUnitDesc"
|
|
||||||
android:gravity="center"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" android:layout_margin="5dp">
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<ImageView
|
<androidx.cardview.widget.CardView
|
||||||
android:src="@drawable/humidity"
|
android:layout_width="195dp"
|
||||||
android:layout_width="55dp"
|
android:layout_height="wrap_content" android:layout_margin="5dp"
|
||||||
android:layout_height="52dp" android:id="@+id/envSensorHumidityImg"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:contentDescription="@string/humidity_icon_desc"
|
|
||||||
android:layout_marginStart="29dp"
|
|
||||||
android:layout_marginTop="21dp"/>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="29dp"
|
|
||||||
android:layout_marginTop="21dp"
|
|
||||||
android:layout_marginBottom="25dp"
|
|
||||||
>
|
>
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="55dp"
|
android:orientation="horizontal"
|
||||||
android:layout_height="26dp" android:id="@+id/envSensorHumidityText"
|
android:layout_width="match_parent"
|
||||||
android:gravity="center" android:foregroundGravity="center"
|
android:layout_height="match_parent">
|
||||||
android:backgroundTint="#00FFFEFE"
|
<ImageView
|
||||||
android:clickable="false" android:drawableTint="#00FFFFFF"
|
android:src="@drawable/thermometer"
|
||||||
android:textStyle="bold" android:textColor="#000000"
|
android:layout_width="55dp"
|
||||||
android:textSize="16sp"
|
android:layout_height="52dp" android:id="@+id/envSensorTempImg"
|
||||||
tools:text="100.11"/>
|
android:adjustViewBounds="false"
|
||||||
<TextView
|
android:contentDescription="@string/temperature_icon_desc"
|
||||||
android:text="@string/humidity_sensor_unit"
|
android:cropToPadding="false"
|
||||||
android:layout_width="55dp"
|
android:scaleType="fitCenter"
|
||||||
android:layout_height="0dp" android:id="@+id/envSensorHumidityUnitDesc"
|
android:layout_marginStart="29dp"
|
||||||
android:layout_weight="1" android:gravity="center"/>
|
android:layout_marginTop="21dp"/>
|
||||||
</LinearLayout>
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="29dp"
|
||||||
|
android:layout_marginTop="21dp"
|
||||||
|
android:layout_marginBottom="25dp"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="26dp" android:id="@+id/envSensorTempText"
|
||||||
|
android:gravity="center" android:foregroundGravity="center"
|
||||||
|
android:backgroundTint="#00FFFEFE"
|
||||||
|
android:clickable="false" android:drawableTint="#00FFFFFF"
|
||||||
|
android:textStyle="bold" android:textColor="#000000"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="10000"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:text="@string/temp_sensor_unit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" android:id="@+id/envSensorTempUnitDesc"
|
||||||
|
android:gravity="center"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" android:layout_margin="5dp">
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
<ImageView
|
||||||
|
android:src="@drawable/humidity"
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="52dp" android:id="@+id/envSensorHumidityImg"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:contentDescription="@string/humidity_icon_desc"
|
||||||
|
android:layout_marginStart="29dp"
|
||||||
|
android:layout_marginTop="21dp"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="29dp"
|
||||||
|
android:layout_marginTop="21dp"
|
||||||
|
android:layout_marginBottom="25dp"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="26dp" android:id="@+id/envSensorHumidityText"
|
||||||
|
android:gravity="center" android:foregroundGravity="center"
|
||||||
|
android:backgroundTint="#00FFFEFE"
|
||||||
|
android:clickable="false" android:drawableTint="#00FFFFFF"
|
||||||
|
android:textStyle="bold" android:textColor="#000000"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="100.11"/>
|
||||||
|
<TextView
|
||||||
|
android:text="@string/humidity_sensor_unit"
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="0dp" android:id="@+id/envSensorHumidityUnitDesc"
|
||||||
|
android:layout_weight="1" android:gravity="center"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
</LinearLayout>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="195dp"
|
|
||||||
android:layout_height="wrap_content" android:layout_margin="5dp">
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
<ImageView
|
>
|
||||||
android:src="@drawable/barometer"
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="55dp"
|
android:layout_width="195dp"
|
||||||
android:layout_height="52dp" android:id="@+id/envSensorPresureImg"
|
android:layout_height="wrap_content" android:layout_margin="5dp">
|
||||||
android:contentDescription="@string/barometer_icon_desc"
|
<LinearLayout
|
||||||
android:layout_marginStart="29dp"
|
android:orientation="horizontal"
|
||||||
android:layout_marginTop="21dp"/>
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" android:layout_marginStart="29dp"
|
|
||||||
android:layout_marginTop="21dp" android:layout_marginBottom="25dp">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="55dp"
|
|
||||||
android:layout_height="26dp" android:id="@+id/envSensorPressureText"
|
|
||||||
android:gravity="center" android:foregroundGravity="center"
|
|
||||||
android:backgroundTint="#00FFFEFE"
|
|
||||||
android:clickable="false" android:drawableTint="#00FFFFFF"
|
|
||||||
android:textStyle="bold" android:textColor="#000000"
|
|
||||||
android:textSize="16sp"
|
|
||||||
tools:text="1000.5"
|
|
||||||
/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/pressure_unit_desc"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" android:id="@+id/envSensorPressureUnitDesc"
|
android:layout_height="match_parent">
|
||||||
android:gravity="center"/>
|
<ImageView
|
||||||
</LinearLayout>
|
android:src="@drawable/barometer"
|
||||||
</LinearLayout>
|
android:layout_width="55dp"
|
||||||
</androidx.cardview.widget.CardView>
|
android:layout_height="52dp" android:id="@+id/envSensorPresureImg"
|
||||||
<androidx.cardview.widget.CardView
|
android:contentDescription="@string/barometer_icon_desc"
|
||||||
android:layout_width="match_parent"
|
android:layout_marginStart="29dp"
|
||||||
android:layout_height="wrap_content" android:layout_margin="5dp">
|
android:layout_marginTop="21dp"/>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content" android:layout_marginStart="29dp"
|
||||||
<ImageView
|
android:layout_marginTop="21dp" android:layout_marginBottom="25dp">
|
||||||
android:src="@drawable/poisoning"
|
<TextView
|
||||||
android:layout_width="55dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="52dp" android:id="@+id/envSensorVocImg"
|
android:layout_height="26dp" android:id="@+id/envSensorPressureText"
|
||||||
android:contentDescription="@string/voc_icon_desc"
|
android:gravity="center" android:foregroundGravity="center"
|
||||||
android:layout_marginStart="29dp"
|
android:backgroundTint="#00FFFEFE"
|
||||||
android:layout_marginTop="21dp"
|
android:clickable="false" android:drawableTint="#00FFFFFF"
|
||||||
/>
|
android:textStyle="bold" android:textColor="#000000"
|
||||||
<LinearLayout
|
android:textSize="16sp"
|
||||||
android:orientation="vertical"
|
tools:text="1000.5"
|
||||||
android:layout_width="wrap_content"
|
/>
|
||||||
android:layout_height="wrap_content" android:layout_marginStart="29dp"
|
<TextView
|
||||||
android:layout_marginTop="21dp" android:layout_marginBottom="25dp">
|
android:text="@string/pressure_unit_desc"
|
||||||
<TextView
|
android:layout_width="match_parent"
|
||||||
android:layout_width="55dp"
|
android:layout_height="wrap_content" android:id="@+id/envSensorPressureUnitDesc"
|
||||||
android:layout_height="26dp" android:id="@+id/envSensorVocText"
|
android:gravity="center"/>
|
||||||
android:gravity="center" android:foregroundGravity="center"
|
</LinearLayout>
|
||||||
android:backgroundTint="#00FFFEFE"
|
</LinearLayout>
|
||||||
android:clickable="false" android:drawableTint="#00FFFFFF"
|
</androidx.cardview.widget.CardView>
|
||||||
android:textStyle="bold" android:textColor="#000000"
|
<androidx.cardview.widget.CardView
|
||||||
android:textSize="16sp"
|
android:layout_width="match_parent"
|
||||||
tools:text="100.11"
|
android:layout_height="wrap_content" android:layout_margin="5dp">
|
||||||
/>
|
<LinearLayout
|
||||||
<TextView
|
android:orientation="horizontal"
|
||||||
android:text="@string/gasvoc_sensor_unit_descriptio"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" android:id="@+id/textView5"
|
android:layout_height="match_parent">
|
||||||
android:gravity="center"/>
|
<ImageView
|
||||||
</LinearLayout>
|
android:src="@drawable/poisoning"
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="52dp" android:id="@+id/envSensorVocImg"
|
||||||
|
android:contentDescription="@string/voc_icon_desc"
|
||||||
|
android:layout_marginStart="29dp"
|
||||||
|
android:layout_marginTop="21dp"
|
||||||
|
/>
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" android:layout_marginStart="29dp"
|
||||||
|
android:layout_marginTop="21dp" android:layout_marginBottom="25dp">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="26dp" android:id="@+id/envSensorVocText"
|
||||||
|
android:gravity="center" android:foregroundGravity="center"
|
||||||
|
android:backgroundTint="#00FFFEFE"
|
||||||
|
android:clickable="false" android:drawableTint="#00FFFFFF"
|
||||||
|
android:textStyle="bold" android:textColor="#000000"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="100.11"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:text="@string/gasvoc_sensor_unit_descriptio"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" android:id="@+id/textView5"
|
||||||
|
android:gravity="center"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</ScrollView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in a new issue