Add scroll view to environment sensor fragment.

This commit is contained in:
Denis-Cosmin Nutiu 2020-11-28 23:03:53 +02:00
parent 18dd554dc4
commit 0a5a59fdb6

View file

@ -6,11 +6,16 @@
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">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
android:id="@+id/cardView" android:layout_margin="5dp"> android:id="@+id/cardView" android:layout_margin="5dp">
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
@ -25,14 +30,15 @@
android:contentDescription="@string/environment_status_description" android:contentDescription="@string/environment_status_description"
android:background="#00FFFFFF" android:background="#00FFFFFF"
android:tooltipText="what is this amaaaizng" android:tooltipText="what is this amaaaizng"
android:layout_marginTop="90dp" app:srcCompat="@drawable/status_neutral" android:layout_marginTop="0dp" app:srcCompat="@drawable/status_neutral"
tools:srcCompat="@drawable/status_neutral" android:adjustViewBounds="true" tools:srcCompat="@drawable/status_neutral" android:adjustViewBounds="true"
android:scaleType="center" android:scaleType="center"
/> />
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/sensorStatusChip" android:layout_height="wrap_content" android:id="@+id/sensorStatusChip"
android:layout_marginEnd="30dp" android:layout_marginStart="30dp" android:textAlignment="center" android:layout_marginEnd="30dp" android:layout_marginStart="30dp"
android:textAlignment="center"
tools:text="Sensor Status Explain" android:textStyle="bold" android:layout_marginTop="15dp" tools:text="Sensor Status Explain" android:textStyle="bold" android:layout_marginTop="15dp"
android:layout_marginBottom="15dp" android:clickable="false"/> android:layout_marginBottom="15dp" android:clickable="false"/>
</LinearLayout> </LinearLayout>
@ -41,11 +47,8 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="409dp" android:layout_width="409dp"
android:layout_height="294dp" android:layout_height="294dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/linearLayout" android:id="@+id/linearLayout"
app:layout_constraintTop_toBottomOf="@+id/cardView"> >
<LinearLayout <LinearLayout
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -63,7 +66,8 @@
android:layout_width="55dp" android:layout_width="55dp"
android:layout_height="52dp" android:id="@+id/envSensorTempImg" android:layout_height="52dp" android:id="@+id/envSensorTempImg"
android:adjustViewBounds="false" android:adjustViewBounds="false"
android:contentDescription="@string/temperature_icon_desc" android:cropToPadding="false" android:contentDescription="@string/temperature_icon_desc"
android:cropToPadding="false"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:layout_marginStart="29dp" android:layout_marginStart="29dp"
android:layout_marginTop="21dp"/> android:layout_marginTop="21dp"/>
@ -216,4 +220,6 @@
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>