438 lines
24 KiB
XML
438 lines
24 KiB
XML
<?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"
|
|
tools:context=".fragment.home.HomeFragment">
|
|
|
|
<data>
|
|
|
|
<variable
|
|
name="click"
|
|
type="com.ttstd.dialer.fragment.home.HomeFragment.BtnClick" />
|
|
</data>
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="3"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
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:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:text="00:00"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_60"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintHorizontal_bias="0.3"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="00:00" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_date"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/dp_16"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_25"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@+id/tv_time"
|
|
app:layout_constraintTop_toBottomOf="@+id/tv_time"
|
|
tools:text="1月1日" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_week"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_20"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@+id/tv_date"
|
|
app:layout_constraintTop_toBottomOf="@+id/tv_date"
|
|
tools:text="星期一" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_lunar"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_20"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@+id/tv_date"
|
|
app:layout_constraintTop_toBottomOf="@+id/tv_week"
|
|
tools:text="正月初一" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_weight="1"
|
|
android:onClick="@{click::openWeather}"
|
|
android:orientation="vertical"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_temp_current"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_60"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintHorizontal_bias="0.7"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:text="N/A°" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_location"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:layout_marginEnd="@dimen/dp_16"
|
|
android:gravity="end"
|
|
android:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_25"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="@+id/tv_temp_current"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/tv_temp_current"
|
|
tools:text="北京市" />
|
|
|
|
|
|
<TextView
|
|
android:id="@+id/tv_weather"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:gravity="end"
|
|
android:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_20"
|
|
app:layout_constraintEnd_toEndOf="@+id/tv_location"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/tv_location"
|
|
tools:text="晴" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_temp"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:gravity="end"
|
|
android:maxLines="1"
|
|
android:shadowColor="#80000000"
|
|
android:shadowDx="2"
|
|
android:shadowDy="2"
|
|
android:shadowRadius="2"
|
|
android:singleLine="true"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/sp_20"
|
|
app:layout_constraintEnd_toEndOf="@+id/tv_weather"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/tv_weather"
|
|
tools:text="0°/10°" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="5"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:onClick="@{click::openContact}"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
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/niceImageView1"
|
|
android:layout_width="@dimen/dp_100"
|
|
android:layout_height="@dimen/dp_100"
|
|
android:adjustViewBounds="true"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/ic_contact"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:maxLines="1"
|
|
android:singleLine="true"
|
|
android:text="联系人"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/home_item_text_size"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView1"
|
|
app:layout_constraintStart_toStartOf="@+id/niceImageView1"
|
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView1" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:onClick="@{click::openSettings}"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
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/niceImageView2"
|
|
android:layout_width="@dimen/dp_100"
|
|
android:layout_height="@dimen/dp_100"
|
|
android:adjustViewBounds="true"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/ic_settings"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:maxLines="1"
|
|
android:singleLine="true"
|
|
android:text="设置"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/home_item_text_size"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView2"
|
|
app:layout_constraintStart_toStartOf="@+id/niceImageView2"
|
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView2" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:onClick="@{click::openDouyin}"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
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/niceImageView3"
|
|
android:layout_width="@dimen/dp_100"
|
|
android:layout_height="@dimen/dp_100"
|
|
android:adjustViewBounds="true"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/ic_douyin"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:maxLines="1"
|
|
android:singleLine="true"
|
|
android:text="微信"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/home_item_text_size"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView3"
|
|
app:layout_constraintStart_toStartOf="@+id/niceImageView3"
|
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView3" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:onClick="@{click::openWeixin}"
|
|
android:orientation="horizontal">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
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/niceImageView4"
|
|
android:layout_width="@dimen/dp_100"
|
|
android:layout_height="@dimen/dp_100"
|
|
android:adjustViewBounds="true"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/ic_weixin"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/dp_8"
|
|
android:maxLines="1"
|
|
android:singleLine="true"
|
|
android:text="抖音"
|
|
android:textColor="@color/black"
|
|
android:textSize="@dimen/home_item_text_size"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="@+id/niceImageView4"
|
|
app:layout_constraintStart_toStartOf="@+id/niceImageView4"
|
|
app:layout_constraintTop_toBottomOf="@+id/niceImageView4" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</FrameLayout>
|
|
</layout> |