Skip to content

Instantly share code, notes, and snippets.

@330132662
Created May 19, 2021 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 330132662/a6ad7f890ff24635e0f225ccdab25b40 to your computer and use it in GitHub Desktop.
Save 330132662/a6ad7f890ff24635e0f225ccdab25b40 to your computer and use it in GitHub Desktop.
无聊的界面
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".ui.act.money.InvCreateActivity">
<LinearLayout
android:id="@+id/web_title_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:fitsSystemWindows="true"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/back_iv"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:src="@drawable/arrows_left_ic"
android:visibility="visible" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="3"
android:gravity="center"
android:orientation="vertical"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" />
<TextView
android:id="@+id/web_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:gravity="center"
android:text="预约详情"
android:textSize="18dp"
android:visibility="visible" />
</LinearLayout>
<LinearLayout
android:id="@+id/right_menu"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
android:gravity="right"
android:orientation="horizontal">
<!--为了占位 这个右侧的文本不能用GONE 也不能超过俩字 否则标题文本将会向两侧偏移 -->
<ImageView
android:id="@+id/web_menu_img"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:layout_marginRight="0dp"
android:src="@mipmap/launcher_ic"
android:visibility="visible" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="0dp"
android:src="@mipmap/launcher_ic"
android:visibility="visible" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:src="@mipmap/launcher_ic"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/web_title_root">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="10dp">
<!-- 这里放正文 -->
<ImageView
android:id="@+id/icon_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="70dp"
android:src="@mipmap/launcher_ic"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="2dp"
android:layout_marginBottom="2dp"
android:background="@drawable/shape_pic_num"
android:gravity="center"
android:padding="1dp"
android:text="12"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/icon_iv"
app:layout_constraintRight_toRightOf="@+id/icon_iv" />
<TextView
android:id="@+id/name_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="xxxxx停车场"
android:textColor="@color/black"
android:textSize="16sp"
app:layout_constraintLeft_toRightOf="@+id/icon_iv"
app:layout_constraintTop_toTopOf="@+id/icon_iv" />
<TextView
android:id="@+id/comment_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="100%"
android:textColor="@color/text_orange"
app:layout_constraintLeft_toLeftOf="@+id/name_tv"
app:layout_constraintTop_toBottomOf="@+id/name_tv" />
<TextView
android:id="@+id/title1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="好评率 | 最近充电"
app:layout_constraintBottom_toBottomOf="@+id/comment_tv"
app:layout_constraintLeft_toRightOf="@+id/comment_tv" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="15分钟前"
app:layout_constraintBottom_toBottomOf="@+id/title1"
app:layout_constraintLeft_toRightOf="@+id/title1" />
<!-- 下一行 -->
<TextView
android:id="@+id/desc_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="自营|免费停车|对外开放|露天1F|"
app:layout_constraintLeft_toLeftOf="@+id/comment_tv"
app:layout_constraintTop_toBottomOf="@+id/comment_tv" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="芝麻信用·免充值"
android:textColor="@color/text_blue"
app:layout_constraintBottom_toBottomOf="@+id/desc_tv"
app:layout_constraintLeft_toRightOf="@+id/desc_tv" />
<TextView
android:id="@+id/zuida_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="近期最大功率150KW"
android:textColor="@color/text_blue"
app:layout_constraintLeft_toLeftOf="@+id/desc_tv"
app:layout_constraintTop_toBottomOf="@+id/desc_tv" />
<TextView
android:id="@+id/address_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="xx省xx市xxxxxxxxxxx停车场"
android:textSize="18sp"
app:layout_constraintLeft_toLeftOf="@+id/icon_iv"
app:layout_constraintTop_toBottomOf="@+id/zuida_tv" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2.1km"
app:layout_constraintBottom_toBottomOf="@+id/address_tv"
app:layout_constraintRight_toLeftOf="@+id/pos_iv" />
<ImageView
android:id="@+id/pos_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/launcher_ic"
app:layout_constraintBottom_toBottomOf="@+id/address_tv"
app:layout_constraintRight_toRightOf="parent" />
<TextView
android:id="@+id/address_tv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="查看位置示意图"
android:textColor="@color/text_blue"
app:layout_constraintLeft_toLeftOf="@+id/address_tv"
app:layout_constraintTop_toBottomOf="@+id/address_tv" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/daojishi_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/shape_login_button1"
android:minHeight="50dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
app:layout_constraintTop_toBottomOf="@+id/address_tv1">
<TextView
android:id="@+id/title2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:text="倒计时"
android:textColor="@color/white"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:background="@drawable/shape_daojishi"
android:text="10分"
android:textColor="@color/text_yellow"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@+id/maohao"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/maohao"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=":"
android:textColor="@color/text_yellow"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/shape_daojishi"
android:text="05秒"
android:textColor="@color/text_yellow"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/maohao"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"
android:src="@mipmap/biao"
app:layout_constraintBottom_toBottomOf="@+id/daojishi_root"
app:layout_constraintEnd_toEndOf="parent" />
<ImageView
android:id="@+id/iv1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:src="@mipmap/launcher_ic"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/daojishi_root" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/shape_status_device"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:text="空闲"
android:textColor="@color/white"
app:layout_constraintLeft_toLeftOf="@+id/iv1"
app:layout_constraintRight_toRightOf="@+id/iv1"
app:layout_constraintTop_toBottomOf="@+id/iv1" />
<TextView
android:id="@+id/device_name_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="101号直流3707xxxxxxx"
app:layout_constraintLeft_toRightOf="@+id/iv1"
app:layout_constraintTop_toTopOf="@+id/iv1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:background="@drawable/shape_device_speed"
android:padding="3dp"
android:text="快"
android:textColor="@color/text_orange"
app:layout_constraintBottom_toBottomOf="@+id/device_name_tv"
app:layout_constraintLeft_toRightOf="@+id/device_name_tv"
app:layout_constraintTop_toTopOf="@+id/device_name_tv" />
<TextView
android:id="@+id/desc1_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="一周前有人成功充电"
android:textColor="@color/text_orange"
app:layout_constraintLeft_toLeftOf="@+id/device_name_tv"
app:layout_constraintTop_toBottomOf="@+id/device_name_tv" />
<TextView
android:id="@+id/title3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="终端编号"
android:textColor="@color/gray1"
app:layout_constraintLeft_toLeftOf="@+id/device_name_tv"
app:layout_constraintTop_toBottomOf="@+id/desc1_tv" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="50010101"
android:textColor="@color/black1"
app:layout_constraintBottom_toBottomOf="@+id/title3"
app:layout_constraintLeft_toRightOf="@+id/title3" />
<!-- -->
<TextView
android:id="@+id/title4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="终端编号"
android:textColor="@color/gray1"
app:layout_constraintLeft_toLeftOf="@+id/device_name_tv"
app:layout_constraintTop_toBottomOf="@+id/title3" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="50010101"
android:textColor="@color/black1"
app:layout_constraintBottom_toBottomOf="@+id/title5"
app:layout_constraintLeft_toRightOf="@+id/title5" />
<!-- -->
<TextView
android:id="@+id/title5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="终端编号"
android:textColor="@color/gray1"
app:layout_constraintLeft_toLeftOf="@+id/device_name_tv"
app:layout_constraintTop_toBottomOf="@+id/title4" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="50010101"
android:textColor="@color/black1"
app:layout_constraintBottom_toBottomOf="@+id/title4"
app:layout_constraintLeft_toRightOf="@+id/title4" />
<!-- -->
<TextView
android:id="@+id/title6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="终端编号"
android:textColor="@color/gray1"
app:layout_constraintLeft_toLeftOf="@+id/device_name_tv"
app:layout_constraintTop_toBottomOf="@+id/title5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="50010101"
android:textColor="@color/black1"
app:layout_constraintBottom_toBottomOf="@+id/title6"
app:layout_constraintLeft_toRightOf="@+id/title6" />
<!-- -->
<TextView
android:id="@+id/title7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="芝麻信用.免充值"
android:textColor="@color/text_blue"
app:layout_constraintLeft_toLeftOf="@+id/title6"
app:layout_constraintTop_toBottomOf="@+id/title6" />
<View
android:id="@+id/div"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="10dp"
android:background="@color/gray1"
app:layout_constraintTop_toBottomOf="@+id/title7" />
<TextView
android:id="@+id/title8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="价格详情"
android:textSize="15sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/div" />
<TextView
android:id="@+id/time_stage_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="当前时段14:00-15:00"
android:textColor="@color/gray1"
app:layout_constraintLeft_toLeftOf="@+id/title8"
app:layout_constraintTop_toBottomOf="@+id/title8" />
<TextView
android:id="@+id/unit_price_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="1.0608"
android:textColor="@color/text_blue"
app:layout_constraintLeft_toLeftOf="@+id/time_stage_tv"
app:layout_constraintTop_toBottomOf="@+id/time_stage_tv" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="元/度"
app:layout_constraintBottom_toBottomOf="@+id/unit_price_tv"
app:layout_constraintLeft_toRightOf="@+id/unit_price_tv" />
<!-- 会员入口 -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/vip_enter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/shape_vip_enter"
android:padding="5dp"
app:layout_constraintTop_toBottomOf="@+id/unit_price_tv">
<ImageView
android:id="@+id/iv2"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/launcher_ic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="开通PLUS会员"
android:textColor="@color/brown"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/iv2"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="立即开通"
android:textColor="@color/brown"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@+id/right_iv"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/right_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/arrows_right_ic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/title9"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginTop="10dp"
android:background="@drawable/shape_ticket_title"
android:gravity="center"
android:padding="3dp"
android:text="券"
android:textColor="@color/white"
app:layout_constraintLeft_toLeftOf="@+id/vip_enter"
app:layout_constraintTop_toBottomOf="@+id/vip_enter" />
<TextView
android:id="@+id/title10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="优惠"
android:textSize="18sp"
app:layout_constraintLeft_toRightOf="@+id/title9"
app:layout_constraintTop_toTopOf="@+id/title9" />
<TextView
android:id="@+id/title11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="优惠券"
app:layout_constraintLeft_toLeftOf="@+id/title10"
app:layout_constraintTop_toBottomOf="@+id/title10" />
<TextView
android:id="@+id/title13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="可以使用优惠券"
app:layout_constraintBottom_toBottomOf="@+id/title11"
app:layout_constraintLeft_toRightOf="@+id/title11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2张"
android:textColor="@color/text_blue"
app:layout_constraintBottom_toBottomOf="@+id/title13"
app:layout_constraintLeft_toRightOf="@+id/title13" />
<TextView
android:id="@+id/title12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="代金券"
app:layout_constraintLeft_toLeftOf="@+id/title11"
app:layout_constraintTop_toBottomOf="@+id/title11" />
<TextView
android:id="@+id/title14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="可以使用代金券"
app:layout_constraintBottom_toBottomOf="@+id/title12"
app:layout_constraintLeft_toLeftOf="@+id/title13" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2张"
android:textColor="@color/text_blue"
app:layout_constraintBottom_toBottomOf="@+id/title14"
app:layout_constraintLeft_toRightOf="@+id/title13" />
<TextView
android:id="@+id/title15"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_p_title"
android:gravity="center"
android:padding="4dp"
android:text="P"
android:textColor="@color/white"
app:layout_constraintLeft_toLeftOf="@+id/title9"
app:layout_constraintTop_toBottomOf="@+id/title12" />
<TextView
android:id="@+id/title16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="停车费说明"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/title15"
app:layout_constraintLeft_toRightOf="@+id/title15" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="新能源车,明白天,。。。。。。。。"
app:layout_constraintLeft_toLeftOf="@+id/title16"
app:layout_constraintTop_toBottomOf="@+id/title16" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment