1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-01-07 08:25:50 +01:00
Gadgetbridge/app/src/main/res/layout/device_item.xml
2015-08-07 11:49:25 +02:00

75 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/activatedBackgroundIndicator"
android:padding="8dp">
<ImageView
android:id="@+id/device_image"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentStart="true"
android:contentDescription="@string/candidate_item_device_image" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/device_image"
android:orientation="vertical"
android:paddingStart="8dp">
<TextView
android:id="@+id/device_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/statuswrapper"
android:layout_toStartOf="@+id/device_info"
android:singleLine="true"
android:typeface="sans" />
<ProgressBar
android:id="@+id/device_busy_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:indeterminate="true" />
<LinearLayout
android:id="@+id/statuswrapper"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/device_name"
android:orientation="horizontal"
android:paddingTop="3dp">
<TextView
android:id="@+id/device_status"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="start"
android:textStyle="bold" />
<TextView
android:id="@+id/battery_status"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="end"
android:textColor="@color/secondarytext"
android:textStyle="bold" />
</LinearLayout>
<TextView
android:id="@+id/device_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/device_name"
android:layout_alignParentEnd="true"
android:gravity="end"
android:textColor="@color/secondarytext"
android:textSize="12sp" />
</RelativeLayout>
</RelativeLayout>