235 lines
9.6 KiB
XML
235 lines
9.6 KiB
XML
<?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:baselineAligned="false"
|
|
android:orientation="horizontal">
|
|
|
|
<!-- 今日节省卡片。 -->
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:id="@+id/cv_preview_savings"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="12dp"
|
|
android:layout_weight="1"
|
|
app:cardBackgroundColor="@android:color/white"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="1dp"
|
|
app:cardPreventCornerOverlap="false">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="160dp"
|
|
android:orientation="vertical"
|
|
android:padding="11dp">
|
|
|
|
<TextView
|
|
style="@style/DevicePreviewSmallHeading"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="17dp"
|
|
android:text="@string/device_preview_savings_title" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:minHeight="16dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
style="@style/DevicePreviewLabel"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/device_preview_charcoal_label" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_preview_charcoal"
|
|
style="@style/DevicePreviewValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:text="@string/device_preview_demo_charcoal"
|
|
android:textSize="12.5sp" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:minHeight="16dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
style="@style/DevicePreviewLabel"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/device_preview_saving_label" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_preview_saving"
|
|
style="@style/DevicePreviewValue"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:text="@string/device_preview_demo_saving"
|
|
android:textSize="12.5sp" />
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:id="@+id/iv_preview_savings"
|
|
android:layout_width="81dp"
|
|
android:layout_height="53dp"
|
|
android:layout_gravity="center_horizontal"
|
|
android:layout_marginTop="18dp"
|
|
android:contentDescription="@null"
|
|
android:scaleType="fitCenter"
|
|
android:src="@mipmap/ic_launcher" />
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<!-- 快捷操作暂只保留入口控件,业务点击由后续页面逻辑接入。 -->
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:id="@+id/cv_preview_actions"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
app:cardBackgroundColor="@android:color/white"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="1dp"
|
|
app:cardPreventCornerOverlap="false">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="160dp"
|
|
android:orientation="vertical"
|
|
android:padding="11dp">
|
|
|
|
<TextView
|
|
style="@style/DevicePreviewSmallHeading"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="17dp"
|
|
android:text="@string/device_preview_actions_title" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/ll_preview_stats"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="7dp"
|
|
android:minHeight="34dp"
|
|
android:background="@drawable/device_preview_action_bg"
|
|
android:foreground="?attr/selectableItemBackground"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="9dp"
|
|
android:paddingVertical="6dp">
|
|
|
|
<ImageView
|
|
android:layout_width="22dp"
|
|
android:layout_height="22dp"
|
|
android:background="@drawable/device_preview_action_icon_bg"
|
|
android:contentDescription="@null"
|
|
android:padding="4dp"
|
|
android:src="@mipmap/ic_launcher" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_carbon_status"
|
|
style="@style/DevicePreviewAction"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/device_preview_stats" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/ll_preview_control"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:minHeight="34dp"
|
|
android:background="@drawable/device_preview_action_bg"
|
|
android:foreground="?attr/selectableItemBackground"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="9dp"
|
|
android:paddingVertical="6dp">
|
|
|
|
<ImageView
|
|
android:layout_width="22dp"
|
|
android:layout_height="22dp"
|
|
android:background="@drawable/device_preview_action_icon_bg"
|
|
android:contentDescription="@null"
|
|
android:padding="4dp"
|
|
android:src="@mipmap/ic_launcher" />
|
|
|
|
<TextView
|
|
style="@style/DevicePreviewAction"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/device_preview_control" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/ll_preview_carbon_points"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="6dp"
|
|
android:minHeight="34dp"
|
|
android:background="@drawable/device_preview_action_bg"
|
|
android:foreground="?attr/selectableItemBackground"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="9dp"
|
|
android:paddingVertical="6dp">
|
|
|
|
<ImageView
|
|
android:layout_width="22dp"
|
|
android:layout_height="22dp"
|
|
android:background="@drawable/device_preview_action_icon_bg"
|
|
android:contentDescription="@null"
|
|
android:padding="4dp"
|
|
android:src="@mipmap/ic_launcher" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_carbon_points"
|
|
style="@style/DevicePreviewAction"
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:maxLines="1"
|
|
android:text="@string/device_preview_carbon_points" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
</LinearLayout>
|