version:4.4

fix:
update:优化闹钟页面,优化日常应用
This commit is contained in:
2024-02-02 10:11:08 +08:00
parent 304d809ee9
commit 2e2d2ac818
163 changed files with 6128 additions and 1109 deletions

View File

@@ -0,0 +1,424 @@
<?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/gray"
tools:context=".activity.alarmclock.AlarmClockAddActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout13"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_close"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout13">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_picker"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_8"
android:layout_weight="4"
android:background="@drawable/add_alarm_background">
<TextView
android:id="@+id/textView24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="选择时间"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_48"
android:layout_marginEnd="@dimen/dp_48"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView24" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_8"
android:layout_weight="1"
android:background="@drawable/add_alarm_background">
<TextView
android:id="@+id/textView25"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:text="闹钟类型"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/textView25"
app:layout_constraintTop_toTopOf="parent">
<RadioButton
android:id="@+id/rb_all"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:background="@drawable/tv_times_bg_medicine"
android:button="@null"
android:checked="true"
android:textColor="@color/radio_botton_gray"
android:textSize="@dimen/sp_9" />
<RadioButton
android:id="@+id/rb_look"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:layout_marginStart="@dimen/dp_8"
android:background="@drawable/tv_times_bg_look"
android:button="@null"
android:textColor="@color/radio_botton_gray"
android:textSize="@dimen/sp_9" />
<RadioButton
android:id="@+id/rb_reserve"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:layout_marginStart="@dimen/dp_8"
android:background="@drawable/tv_times_bg_reserve"
android:button="@null"
android:textColor="@color/radio_botton_gray"
android:textSize="@dimen/sp_9" />
</RadioGroup>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginEnd="@dimen/dp_8"
android:layout_weight="2"
android:background="@drawable/add_alarm_background">
<LinearLayout
android:id="@+id/ll_type"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_type"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<TextView
android:id="@+id/textView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:text="重复"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:text="只响一次"
android:textColor="@color/title_gray"
android:textSize="@dimen/sp_12"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb1"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_20"
android:background="@drawable/tv_times_bg_once_selector"
android:button="@null"
android:textColor="@color/radio_botton_gray"
android:textSize="@dimen/sp_9" />
<RadioButton
android:id="@+id/rb2"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_20"
android:layout_marginStart="@dimen/dp_8"
android:background="@drawable/tv_times_bg_loop_selector"
android:button="@null"
android:textColor="@color/radio_botton_gray"
android:textSize="@dimen/sp_9" />
</RadioGroup>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16"
android:background="@color/gray" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:text="提醒方式"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:text="弹窗"
android:textColor="@color/title_gray"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:layout_weight="1"
android:background="@drawable/add_alarm_background">
<TextView
android:id="@+id/textView27"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="标题"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_activation"
android:layout_width="0dp"
android:layout_height="@dimen/dp_28"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16"
android:background="@drawable/edit_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<EditText
android:id="@+id/et_activation"
android:layout_width="0dp"
android:layout_height="@dimen/dp_26"
android:layout_alignParentBottom="true"
android:background="@null"
android:hint="请输入标题"
android:maxLength="13"
android:maxLines="1"
android:text="用药闹钟"
android:singleLine="true"
android:textColorHint="@color/radio_botton_gray"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_8"
android:layout_weight="3"
android:background="@drawable/add_alarm_background">
<ImageView
android:id="@+id/iv_add"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_20"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_add_alarm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="选择图片或视频"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_pic"
android:layout_width="@dimen/dp_72"
android:layout_height="@dimen/dp_72"
android:background="@drawable/icon_add"
android:padding="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView28"
app:layout_constraintTop_toBottomOf="@+id/textView28">
<ImageView
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:adjustViewBounds="true"
android:scaleType="centerInside"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.shehuan.niv.NiceImageView
android:id="@+id/nv_pic"
android:layout_width="@dimen/dp_72"
android:layout_height="@dimen/dp_72"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:visibility="gone"
app:corner_radius="@dimen/dp_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView28"
app:layout_constraintTop_toBottomOf="@+id/textView28" />
<TextView
android:id="@+id/tv_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textColor="@color/radio_botton_gray"
android:textSize="@dimen/sp_13"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/cl_pic"
app:layout_constraintStart_toStartOf="@+id/cl_pic"
app:layout_constraintTop_toBottomOf="@+id/cl_pic"
tools:text="00:00" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray"
tools:context=".activity.alarm.AlarmClockAddActivity">
tools:context=".activity.alarmclock.AlarmClockAddActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout13"

View File

@@ -0,0 +1,294 @@
<?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/alarm_background_color"
tools:context=".activity.alarm.AlarmActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout14"
android:layout_width="@dimen/dp_140"
android:layout_height="match_parent"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_exit"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_36"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView12"
android:layout_width="@dimen/dp_16"
android:layout_height="@dimen/dp_16"
android:layout_marginStart="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/back_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_6"
android:text="闹钟设置"
android:textColor="@color/black"
android:textSize="@dimen/sp_13"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView12"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="@dimen/dp_140"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_exit">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_all"
android:layout_width="@dimen/dp_124"
android:layout_height="@dimen/dp_52"
android:layout_gravity="end"
android:background="@drawable/alarm_pressed_background">
<ImageView
android:id="@+id/imageView1"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:layout_marginStart="4dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_alarm_all"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="所有闹钟"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView2"
app:layout_constraintStart_toEndOf="@+id/imageView1"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_touch"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_medicine"
android:layout_width="@dimen/dp_124"
android:layout_height="@dimen/dp_52"
android:layout_gravity="end">
<ImageView
android:id="@+id/imageView3"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:layout_marginStart="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_alarm_medicine"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用药闹钟"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView4"
app:layout_constraintStart_toEndOf="@+id/imageView3"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_look"
android:layout_width="@dimen/dp_124"
android:layout_height="@dimen/dp_52"
android:layout_gravity="end">
<ImageView
android:id="@+id/imageView5"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:layout_marginStart="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_alarm_look"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="接送闹钟"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView6"
app:layout_constraintStart_toEndOf="@+id/imageView5"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView6"
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_reserve"
android:layout_width="@dimen/dp_124"
android:layout_height="@dimen/dp_52"
android:layout_gravity="end">
<ImageView
android:id="@+id/imageView7"
android:layout_width="@dimen/dp_36"
android:layout_height="@dimen/dp_36"
android:layout_marginStart="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_alarm_reserve"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预约闹钟"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/imageView8"
app:layout_constraintStart_toEndOf="@+id/imageView7"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView8"
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:layout_marginEnd="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<ImageView
android:id="@+id/iv_add"
android:layout_width="@dimen/dp_75"
android:layout_height="@dimen/dp_25"
android:layout_marginBottom="@dimen/dp_20"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_add_alarm"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/constraintLayout14"
app:layout_constraintTop_toTopOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data"
android:layout_width="match_parent"
android:background="#e6e6e6"
android:layout_height="match_parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
android:layout_width="match_parent"
android:background="#e6e6e6"
android:layout_height="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/imageView9"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_nodata"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.501"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.343" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="没有数据"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
app:layout_constraintEnd_toEndOf="@+id/imageView9"
app:layout_constraintHorizontal_bias="0.487"
app:layout_constraintStart_toStartOf="@+id/imageView9"
app:layout_constraintTop_toBottomOf="@+id/imageView9" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.alarm.AlarmClockActivity">
tools:context=".activity.alarmclock.AlarmClockActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout4"

View File

@@ -0,0 +1,92 @@
<?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">
<data>
<variable
name="articleInfo"
type="com.uiuios.aios.bean.ArticleInfo" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_32"
android:layout_marginEnd="@dimen/dp_32"
android:gravity="center"
android:maxLines="2"
android:textColor="@color/white"
android:textSize="@dimen/sp_14"
android:text="@{articleInfo.title}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:gravity="center"
android:maxLines="2"
app:setTime="@{articleInfo.update_time}"
android:text="2004/01/24"
android:textColor="@color/white"
android:textSize="@dimen/sp_12"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
<ScrollView
android:id="@+id/scrollView2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_time">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.shehuan.niv.NiceImageView
android:id="@+id/niceImageView"
android:layout_width="@dimen/dp_300"
app:corner_radius="@dimen/dp_16"
android:layout_height="@dimen/dp_200"
app:error="@{@drawable/icon_nodata}"
app:imageUrl="@{articleInfo.img}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_8"
android:textColor="@color/white"
android:text="@{articleInfo.content}"
android:textSize="@dimen/sp_12"
app:layout_constraintTop_toBottomOf="@+id/niceImageView" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@@ -0,0 +1,65 @@
<?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"
tools:context=".activity.InformationActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_video"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rv_title" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_nodata"
android:layout_width="match_parent"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rv_title">
<ImageView
android:id="@+id/imageView"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_nodata"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.45" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:maxLines="1"
android:text="没有数据"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
app:layout_constraintEnd_toEndOf="@+id/imageView"
app:layout_constraintStart_toStartOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,138 @@
<?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"
android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".activity.location.LocationAcivity"
android:id="@+id/bg"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/root"
android:layout_width="@dimen/dp_350"
android:layout_height="@dimen/dp_280"
android:background="@drawable/location_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="选择城市"
android:textColor="@color/black"
android:textSize="@dimen/sp_12"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_8"
app:layout_constraintBottom_toTopOf="@+id/cl_location"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout6"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_24"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_16"
android:background="@drawable/location_search_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageView10"
android:layout_width="@dimen/dp_12"
android:layout_height="@dimen/dp_12"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_search"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/edit_search"
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@null"
android:hint="搜索城市"
android:maxLines="1"
android:paddingStart="@dimen/dp_8"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView10"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:text="热门城市"
android:textColor="#535353"
android:textSize="@dimen/sp_11"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout6" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_city"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView22" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_area"
android:layout_width="0dp"
android:layout_height="@dimen/dp_160"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="@+id/constraintLayout6"
app:layout_constraintStart_toStartOf="@+id/constraintLayout6"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout6" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_location"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_16"
android:background="@drawable/position_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我的位置"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -22,7 +22,7 @@
android:id="@+id/cl_weather"
android:layout_width="@dimen/dp_157"
android:layout_height="@dimen/dp_96"
android:background="@drawable/home_weather_calendar"
android:background="@drawable/custom_bg_weather"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -115,17 +115,30 @@
android:layout_width="@dimen/dp_157"
android:layout_height="@dimen/dp_203"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/home_daily_app"
android:background="@drawable/bg_black_transparent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_weather">
<TextView
android:id="@+id/tv_app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_6"
android:text="日常应用"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_app"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/dp_24"
android:layout_marginTop="@dimen/dp_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/tv_app" />
<ImageView
android:id="@+id/iv_nodata"
@@ -134,27 +147,7 @@
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/nodata"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/rv_app" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_space"
android:layout_width="@dimen/dp_115"
android:layout_height="@dimen/dp_142"
android:layout_marginStart="@dimen/dp_13"
android:background="@drawable/home_family_space"
app:layout_constraintStart_toEndOf="@+id/cl_weather"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="@dimen/dp_69"
android:layout_height="@dimen/dp_90"
android:src="@drawable/home_icon_space"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -162,14 +155,73 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_space"
android:layout_width="@dimen/dp_115"
android:layout_height="@dimen/dp_142"
android:layout_marginStart="@dimen/dp_13"
android:background="@drawable/bg_black_transparent"
app:layout_constraintStart_toEndOf="@+id/cl_weather"
app:layout_constraintTop_toTopOf="parent">
<com.shehuan.niv.NiceImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/home_family_space"
app:corner_radius="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_10"
android:text="家庭空间"
android:textColor="#b48a5a"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_marginEnd="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_play"
app:layout_constraintBottom_toBottomOf="@+id/textView10"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView10" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_health"
android:layout_width="@dimen/dp_115"
android:layout_height="@dimen/dp_154"
android:background="@drawable/home_health_protection"
android:background="@drawable/bg_black_transparent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/cl_space">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_6"
android:text="爱心闹钟"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.shehuan.niv.NiceImageView
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
@@ -208,22 +260,35 @@
android:layout_width="@dimen/dp_230"
android:layout_height="@dimen/dp_142"
android:layout_marginStart="@dimen/dp_12"
android:background="@drawable/home_love_reminder"
android:background="@drawable/bg_black_transparent"
app:layout_constraintStart_toEndOf="@+id/cl_space"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_6"
android:text="爱心闹钟"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_noti"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_24"
android:layout_marginTop="@dimen/dp_6"
android:layout_marginEnd="@dimen/dp_16"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/textView3" />
<ImageView
android:id="@+id/iv_note_nodata"
@@ -231,7 +296,7 @@
android:layout_height="@dimen/dp_80"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/icon_add_alarm"
android:src="@drawable/icon_add_alarm_clock"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -251,10 +316,22 @@
android:id="@+id/cl_clear"
android:layout_width="@dimen/dp_109"
android:layout_height="@dimen/dp_71"
android:background="@drawable/home_app_acceleration"
android:background="@drawable/bg_black_transparent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_6"
android:text="一键加速"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.king.view.circleprogressview.CircleProgressView
android:id="@+id/cpv"
android:layout_width="@dimen/dp_56"
@@ -276,31 +353,101 @@
android:layout_width="@dimen/dp_109"
android:layout_height="@dimen/dp_71"
android:layout_marginStart="@dimen/dp_13"
android:background="@drawable/home_emergency_call"
android:background="@drawable/bg_black_transparent"
app:layout_constraintStart_toEndOf="@+id/cl_clear"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_6"
android:text="紧急呼叫"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/home_icon_sos"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_contact"
android:layout_width="@dimen/dp_109"
android:layout_height="@dimen/dp_71"
android:background="@drawable/home_dialer"
android:background="@drawable/bg_black_transparent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_6"
android:text="快捷电话"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/home_dialer"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_appstore"
android:layout_width="@dimen/dp_109"
android:layout_height="@dimen/dp_71"
android:background="@drawable/home_application_icon"
android:background="@drawable/bg_black_transparent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/cl_sos"
app:layout_constraintTop_toTopOf="@+id/cl_contact" />
app:layout_constraintTop_toTopOf="@+id/cl_contact">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_6"
android:text="应用市场"
android:textColor="@color/white"
android:textSize="@dimen/sp_9"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/home_application_icon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -62,16 +62,18 @@
<TextView
android:id="@+id/bg"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginStart="60dp"
android:layout_marginBottom="60dp"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20"
android:layout_marginStart="@dimen/dp_36"
android:layout_marginBottom="@dimen/dp_36"
android:background="@drawable/badge_bg"
android:gravity="center"
android:minWidth="30dp"
android:minWidth="@dimen/dp_20"
android:minHeight="@dimen/dp_20"
android:text="1"
android:maxLines="1"
android:textColor="@color/white"
android:textSize="@dimen/sp_12"
android:textSize="@dimen/sp_10"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/iv"
app:layout_constraintStart_toStartOf="@+id/iv" />

View File

@@ -0,0 +1,22 @@
<?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"
android:layout_width="wrap_content"
android:id="@+id/root"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_city"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/item_city_background"
android:text="北京"
android:textColor="@color/black"
android:textSize="@dimen/sp_9"
android:maxLines="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,24 @@
<?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"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_20"
android:id="@+id/root"
android:background="@color/white">
<TextView
android:id="@+id/tv_district"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16"
android:maxLines="1"
android:text="北京"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,46 @@
<?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:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.shehuan.niv.NiceImageView
android:id="@+id/nv_consult"
android:layout_width="@dimen/dp_140"
android:layout_height="@dimen/dp_100"
android:layout_marginTop="@dimen/dp_8"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:corner_radius="@dimen/dp_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_consult_title"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:textSize="@dimen/sp_11"
android:textColor="@color/white"
app:layout_constraintBottom_toTopOf="@+id/tv_time"
app:layout_constraintEnd_toStartOf="@+id/nv_consult"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/nv_consult"
tools:text="老年人高血压怎么调理?" />
<TextView
android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_8"
android:layout_marginStart="@dimen/dp_8"
android:textSize="@dimen/sp_8"
android:textColor="@color/gray"
android:maxLines="1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/nv_consult"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,54 @@
<?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">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.shehuan.niv.NiceImageView
android:id="@+id/nv_cover"
android:layout_width="@dimen/dp_140"
android:layout_height="@dimen/dp_60"
android:layout_marginTop="@dimen/dp_4"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:corner_radius="@dimen/dp_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_play"
app:layout_constraintBottom_toBottomOf="@+id/nv_cover"
app:layout_constraintEnd_toEndOf="@+id/nv_cover"
app:layout_constraintStart_toStartOf="@+id/nv_cover"
app:layout_constraintTop_toTopOf="@+id/nv_cover" />
<TextView
android:id="@+id/tv_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_4"
android:layout_marginEnd="@dimen/dp_8"
android:gravity="center"
android:maxLines="1"
android:textSize="@dimen/sp_9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/nv_cover"
tools:text="老年人高血压怎么调理?" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,40 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.shehuan.niv.NiceImageView
android:id="@+id/iv_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:corner_radius="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/icon_play"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,34 @@
<?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:id="@+id/root"
android:layout_height="wrap_content">
<com.shehuan.niv.NiceImageView
android:id="@+id/nv_consult"
android:layout_width="@dimen/dp_140"
android:layout_height="@dimen/dp_100"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:layout_marginTop="@dimen/dp_4"
app:corner_radius="@dimen/dp_8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_consult_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:maxLines="2"
android:textSize="@dimen/sp_9"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/nv_consult"
tools:text="老年人高血压怎么调理?" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.shehuan.niv.NiceImageView
android:id="@+id/nv_goods_pic"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_130"
android:layout_marginStart="@dimen/dp_16"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:corner_radius="@dimen/dp_8"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_goods_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginEnd="@dimen/dp_8"
android:maxLines="3"
android:textColor="@color/black"
android:textSize="@dimen/sp_11"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/nv_goods_pic"
app:layout_constraintTop_toTopOf="@+id/nv_goods_pic"
tools:text="可益康 中粮 红枸杞原浆 滋补鲜枸杞汁枸杞子原液节日礼品礼盒 枸杞原浆[买1发2买2发5]" />
<TextView
android:id="@+id/tv_goods_pirce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:textColor="@color/red"
android:textSize="@dimen/sp_14"
app:layout_constraintBottom_toTopOf="@+id/tv_buy"
app:layout_constraintStart_toStartOf="@+id/tv_goods_title"
app:layout_constraintTop_toBottomOf="@+id/tv_goods_title"
tools:text="热卖促销¥268" />
<TextView
android:id="@+id/tv_buy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/buy_button_bg"
android:text="立即抢购"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/nv_goods_pic"
app:layout_constraintEnd_toEndOf="@+id/tv_goods_title" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,22 @@
<?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="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:background="@drawable/title_background"
android:textColor="@color/white"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="测试" />
</androidx.constraintlayout.widget.ConstraintLayout>