1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-26 20:06:52 +01:00
Gadgetbridge/app/src/main/res/layout/device_item.xml

96 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/activatedBackgroundIndicator"
android:columnCount="2"
android:padding="8dp">
<ImageView
android:id="@+id/device_image"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/candidate_item_device_image"
tools:src="@drawable/ic_device_pebble" />
<GridLayout
android:layout_gravity="fill_horizontal"
android:background="?android:attr/activatedBackgroundIndicator"
android:columnCount="3"
android:paddingBottom="2dp"
android:paddingTop="3dp">
<TextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:typeface="sans"
tools:text="My Pebble Watch" />
<TextView
android:id="@+id/battery_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="7sp"
android:paddingRight="7sp"
android:textColor="@color/secondarytext"
android:textStyle="bold"
tools:text="BAT" />
<ImageView
android:id="@+id/device_info_image"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center_vertical|right"
android:layout_rowSpan="2"
android:clickable="true"
android:contentDescription="@string/candidate_item_device_image"
android:scaleType="centerInside"
android:src="@drawable/ic_information_outline_grey600_24dp" />
<TextView
android:id="@+id/device_status"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="fill_horizontal"
android:gravity="start|bottom"
android:textStyle="bold"
tools:text="@string/connecting" />
<TextView
android:id="@+id/battery_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:gravity="start|bottom"
android:paddingLeft="7sp"
android:paddingRight="7sp"
android:textColor="@color/secondarytext"
android:textStyle="bold"
tools:text="100% CHG" />
<ProgressBar
android:id="@+id/device_busy_indicator"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="140dp"
android:layout_height="4dp"
android:indeterminate="true"
android:visibility="visible"
tools:visibility="visible" />
</GridLayout>
<ListView
android:id="@+id/device_item_infos"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_columnSpan="2"
android:layout_gravity="fill"
android:layout_marginStart="@dimen/widget_margin"
android:gravity="fill_horizontal"
android:paddingLeft="36dp"
android:visibility="gone" />
</GridLayout>