设备,碳排,个人中心
This commit is contained in:
279
app/src/main/res/layout/carbon_points_layout.xml
Normal file
279
app/src/main/res/layout/carbon_points_layout.xml
Normal file
@@ -0,0 +1,279 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:fitsSystemWindows="true"
|
||||
android:background="@color/device_preview_background"
|
||||
tools:context=".carbon.CarbonPointsActivity"
|
||||
tools:locale="en">
|
||||
|
||||
<include
|
||||
android:id="@+id/include_title"
|
||||
layout="@layout/include_activity_top_title_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
app:title="@{@string/carbon_points_title}"
|
||||
app:titleTextColor="@{@color/carbon_text}" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="28dp"
|
||||
android:paddingBottom="32dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<!-- 积分余额与月度净增独立于下方的流水筛选。 -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardBackgroundColor="@android:color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="96dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="18dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/CarbonPointsSummaryLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:text="@string/carbon_points_balance" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_balance"
|
||||
style="@style/CarbonPointsSummaryValue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/device_data_orange"
|
||||
tools:text="2,860 Points" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="@color/carbon_divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/CarbonPointsSummaryLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:text="@string/carbon_points_monthly_net" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_monthly_net"
|
||||
style="@style/CarbonPointsSummaryValue"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/carbon_green"
|
||||
tools:text="+420 Points" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardBackgroundColor="@android:color/white">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:padding="4dp"
|
||||
android:background="@drawable/carbon_metric_bg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_all"
|
||||
style="@style/CarbonFilter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/carbon_period_bg"
|
||||
android:text="@string/carbon_points_all" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_earned"
|
||||
style="@style/CarbonFilter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/carbon_period_bg"
|
||||
android:text="@string/carbon_points_earned" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_spent"
|
||||
style="@style/CarbonFilter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/carbon_period_bg"
|
||||
android:text="@string/carbon_points_spent" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_today"
|
||||
style="@style/CarbonPointsRange"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="65"
|
||||
android:text="@string/carbon_points_today" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_week"
|
||||
style="@style/CarbonPointsRange"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="88"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/carbon_points_week" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_month"
|
||||
style="@style/CarbonPointsRange"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="96"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/carbon_points_month" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="73" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
app:cardBackgroundColor="@android:color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="3dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="21dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_records_title"
|
||||
style="@style/CarbonHeading"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/carbon_points_all_records" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_count"
|
||||
style="@style/CarbonCaption"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
tools:text="75 Records" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_carbon_points"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:overScrollMode="never"
|
||||
tools:listitem="@layout/item_carbon_points"
|
||||
tools:itemCount="5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_empty"
|
||||
style="@style/CarbonCaption"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="96dp"
|
||||
android:visibility="gone"
|
||||
android:text="@string/carbon_points_empty" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_points_more"
|
||||
style="@style/CarbonText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:textSize="13.33sp"
|
||||
android:textColor="@color/device_data_orange"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:text="@string/carbon_points_load_more" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user