| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@color/white" |
| | | android:orientation="vertical"> |
| | | |
| | | <!-- Main Content Area --> |
| | | <LinearLayout |
| | | android:id="@+id/ll_main_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="@dimen/dimension_70" |
| | | android:orientation="horizontal"> |
| | | android:layout_height="wrap_content" |
| | | android:background="?attr/selectableItemBackground" |
| | | android:gravity="center_vertical" |
| | | android:minHeight="80dp" |
| | | android:orientation="horizontal" |
| | | android:paddingLeft="16dp" |
| | | android:paddingRight="16dp" |
| | | android:paddingTop="12dp" |
| | | android:paddingBottom="12dp"> |
| | | |
| | | <!-- Device Status Icon (RSSSI or Icon) --> |
| | | <RelativeLayout |
| | | android:layout_width="@dimen/dimension_80" |
| | | android:layout_height="@dimen/dimension_70"> |
| | | android:layout_width="48dp" |
| | | android:layout_height="48dp" |
| | | android:background="@drawable/bg_circle" |
| | | android:backgroundTint="#F0F2F5" |
| | | android:layout_marginEnd="16dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | <ImageView |
| | | android:id="@+id/device_icon" |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_centerInParent="true" |
| | | android:orientation="vertical"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/device_icon" |
| | | android:layout_width="30dp" |
| | | android:layout_height="30dp" |
| | | android:src="@mipmap/ic_sanjiao" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/rssi" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="@dimen/dimension_5" |
| | | android:text="-dBm" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textSize="@dimen/dimension_10" /> |
| | | |
| | | </LinearLayout> |
| | | android:src="@mipmap/ic_sanjiao" |
| | | app:tint="@color/base_color" /> |
| | | |
| | | </RelativeLayout> |
| | | |
| | | <RelativeLayout |
| | | <!-- Device Info --> |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="@dimen/dimension_70" |
| | | android:layout_weight="1"> |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical"> |
| | | |
| | | <LinearLayout |
| | | <TextView |
| | | android:id="@+id/device_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:orientation="vertical"> |
| | | android:text="Unknown Device" |
| | | android:textColor="#333333" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" |
| | | android:maxLines="1" |
| | | android:ellipsize="end" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/device_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:maxLines="1" /> |
| | | <TextView |
| | | android:id="@+id/device_address" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="4dp" |
| | | android:text="00:00:00:00:00:00" |
| | | android:textColor="#999999" |
| | | android:textSize="12sp" |
| | | android:fontFamily="monospace" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/device_address" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="@dimen/dimension_5" |
| | | android:maxLines="1" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textSize="@dimen/dimension_10" /> |
| | | <TextView |
| | | android:id="@+id/rssi" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="4dp" |
| | | android:text="-65dBm" |
| | | android:textColor="@color/base_color" |
| | | android:textSize="11sp" |
| | | android:textStyle="italic" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | | <!-- Actions --> |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal"> |
| | | |
| | | </RelativeLayout> |
| | | |
| | | <RelativeLayout |
| | | android:layout_width="130dp" |
| | | android:layout_height="@dimen/dimension_70"> |
| | | |
| | | <Button |
| | | <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton |
| | | android:id="@+id/conn_btn" |
| | | android:layout_width="@dimen/dimension_80" |
| | | android:layout_height="40dp" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginRight="@dimen/dimension_5" |
| | | android:layout_toLeftOf="@id/iv_down" |
| | | android:focusable="false" |
| | | android:text="CONNECT" |
| | | android:textSize="@dimen/dimension_10" /> |
| | | android:layout_width="80dp" |
| | | android:layout_height="32dp" |
| | | android:text="连接" |
| | | android:textColor="@color/white" |
| | | android:textSize="12sp" |
| | | app:qmui_backgroundColor="@color/base_color" |
| | | app:qmui_radius="16dp" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_down" |
| | | android:layout_width="20dp" |
| | | android:layout_height="20dp" |
| | | android:layout_alignParentRight="true" |
| | | android:layout_centerVertical="true" |
| | | android:layout_marginRight="20dp" |
| | | android:src="@mipmap/ic_down" /> |
| | | </RelativeLayout> |
| | | android:layout_marginLeft="12dp" |
| | | android:src="@mipmap/ic_down" |
| | | app:tint="#CCCCCC" /> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | <!-- More Info Area (Expandable) --> |
| | | <LinearLayout |
| | | android:id="@+id/ll_more_info" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:paddingLeft="20dp" |
| | | android:paddingRight="20dp" |
| | | android:paddingBottom="10dp" |
| | | android:paddingLeft="16dp" |
| | | android:paddingRight="16dp" |
| | | android:paddingBottom="16dp" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_device_type" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | |
| | | android:id="@+id/tv_adv_type" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | |
| | | android:id="@+id/tv_flags" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | |
| | | android:id="@+id/tv_local_name" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | |
| | | android:id="@+id/tv_tx_power" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_service_uuids" |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_service_data" |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_manufacturer_data" |
| | | android:layout_width="wrap_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/qmui_config_color_gray_6" |
| | | android:textColor="#666666" |
| | | android:textSize="12sp" |
| | | android:layout_marginTop="2dp"/> |
| | | </LinearLayout> |
| | | |
| | | <!-- Bottom Divider --> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:layout_marginLeft="16dp" |
| | | android:layout_marginRight="16dp" |
| | | android:background="#F0F2F5" /> |
| | | |
| | | </LinearLayout> |