Ph0tonic/SDP_Projet

View on GitHub
app/src/main/res/layout/fragment_drone_status.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<TableLayout 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:id="@+id/drone_status"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/tiny_margin"
    android:background="@color/transparentClouds"
    android:padding="@dimen/tiny_padding"
    tools:context=".ui.drone.DroneStatusFragment"
    tools:layout_constraintLeft_creator="1"
    tools:layout_constraintTop_creator="1">

    <TableRow>
        <ImageView
            android:id="@+id/battery_level_icon"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:contentDescription="@string/battery_description_tag"
            android:rotation="90"
            app:srcCompat="@drawable/ic_battery1" />

        <TextView
            android:id="@+id/battery_level"
            android:theme="@style/AppTheme.InformationDisplayTheme" />
    </TableRow>

    <TableRow>
        <ImageView
            android:id="@+id/imageView4"
            android:layout_width="21dp"
            android:layout_height="match_parent"
            android:contentDescription="@string/altitude_description_tag"
            app:srcCompat="@drawable/ic_altitude" />

        <TextView
            android:id="@+id/altitude"
            android:theme="@style/AppTheme.InformationDisplayTheme" />
    </TableRow>

    <TableRow>
        <ImageView
            android:id="@+id/imageView2"
            android:layout_width="18dp"
            android:layout_height="match_parent"
            android:contentDescription="@string/speed_description_tag"
            app:srcCompat="@drawable/ic_speed" />

        <TextView
            android:id="@+id/speed"
            android:theme="@style/AppTheme.InformationDisplayTheme" />
    </TableRow>

    <TableRow>
        <ImageView
            android:id="@+id/imageView3"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:contentDescription="@string/distance_to_user_description_tag"
            app:srcCompat="@drawable/ic_distancetodrone" />

        <TextView
            android:id="@+id/distance_to_user"
            android:theme="@style/AppTheme.InformationDisplayTheme" />
    </TableRow>

    <TableRow>
        <ImageView
            android:id="@+id/imageView5"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:contentDescription="@string/distance_to_home_description_tag"
            app:srcCompat="@drawable/ic_distancetohome" />

        <TextView
            android:id="@+id/distance_to_home"
            android:text="@string/no_info"
            android:theme="@style/AppTheme.InformationDisplayTheme" />
    </TableRow>
</TableLayout>