<?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>
|
<variable
|
name="viewModel"
|
type="com.application.zhangshi_app_android.ui.function.TourismDetailActivityViewModel" />
|
</data>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
android:background="@color/color_normal_background"
|
android:orientation="vertical">
|
|
<com.android.app_base.widget.ExtendTitleBar
|
android:id="@+id/title_bar"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
app:title="@{viewModel.beanLiveData.title==null?`新增旅游费用记录`:viewModel.beanLiveData.title}"
|
app:titleGravity="left"
|
>
|
<FrameLayout
|
android:layout_width="24dp"
|
android:layout_height="24dp"
|
android:layout_marginHorizontal="16dp"
|
android:layout_gravity="center_vertical|end"
|
>
|
<ImageView
|
android:id="@+id/iv_operate"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_gravity="center"
|
android:background="@{viewModel.typeLiveData?@drawable/ic_operate_finish:@drawable/ic_operate}"
|
/>
|
</FrameLayout>
|
</com.android.app_base.widget.ExtendTitleBar>
|
<ScrollView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
android:paddingHorizontal="20dp"
|
android:paddingBottom="20dp"
|
>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_marginTop="@dimen/dp_10"
|
android:layout_height="@dimen/dp_20"
|
android:text="标题"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
|
|
<EditText
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:inputType="text"
|
android:autofillHints="creditCardNumber"
|
android:hint="@{viewModel.typeLiveData?`请输入标题`:``}"
|
android:textColorHint="#6b000000"
|
android:textColor="#DE000000"
|
android:textSize="16sp"
|
android:text="@={viewModel.beanLiveData.title}"
|
android:enabled="@{viewModel.typeLiveData}"
|
/>
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_marginTop="10dp"
|
android:layout_height="wrap_content"
|
android:text="开始时间"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
|
<EditText
|
android:id="@+id/et_start_time"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="2dp"
|
android:textColorHint="#6b000000"
|
android:hint="@{viewModel.typeLiveData?`请选择开始时间`:``}"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.startTime}"
|
android:textSize="16sp"
|
android:focusable="false"
|
android:cursorVisible="false"
|
android:longClickable="false"
|
android:clickable="@{viewModel.typeLiveData}"
|
android:backgroundTint="#6B000000"
|
/>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_marginTop="10dp"
|
android:layout_height="wrap_content"
|
android:text="结束时间"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<EditText
|
android:id="@+id/et_end_time"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="2dp"
|
android:textColorHint="#6b000000"
|
android:hint="@{viewModel.typeLiveData?`请选择结束时间`:``}"
|
android:text="@={viewModel.beanLiveData.endTime}"
|
android:textColor="#DE000000"
|
android:textSize="16sp"
|
android:clickable="@{viewModel.typeLiveData}"
|
android:focusable="false"
|
android:cursorVisible="false"
|
android:longClickable="false"
|
android:backgroundTint="#6B000000"
|
/>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_marginTop="10dp"
|
android:layout_height="wrap_content"
|
android:text="总天数"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_total_day"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="2dp"
|
android:inputType="number"
|
android:textColorHint="#6b000000"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.totalDay}"
|
android:textSize="16sp"
|
android:enabled="false"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_total_day"
|
app:layout_constraintStart_toStartOf="@id/et_total_day"
|
app:layout_constraintBottom_toBottomOf="@id/et_total_day"
|
app:layout_constraintEnd_toEndOf="@id/et_total_day"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_marginTop="10dp"
|
android:layout_height="wrap_content"
|
android:text="总金额"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_total_cost"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="2dp"
|
android:inputType="numberDecimal"
|
android:textColorHint="#6b000000"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.totalCost}"
|
android:textSize="16sp"
|
android:enabled="false"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_total_cost"
|
app:layout_constraintStart_toStartOf="@id/et_total_cost"
|
app:layout_constraintBottom_toBottomOf="@id/et_total_cost"
|
app:layout_constraintEnd_toEndOf="@id/et_total_cost"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="12dp"
|
>
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:orientation="vertical"
|
>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="总金额"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_total_cost1"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:inputType="numberDecimal"
|
android:textColorHint="#6b000000"
|
android:textColor="#DE000000"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:text="@={viewModel.beanLiveData.totalCost}"
|
android:textSize="16sp"
|
android:enabled="false"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_total_cost1"
|
app:layout_constraintStart_toStartOf="@id/et_total_cost1"
|
app:layout_constraintBottom_toBottomOf="@id/et_total_cost1"
|
app:layout_constraintEnd_toEndOf="@id/et_total_cost1"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
</LinearLayout>
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:orientation="vertical"
|
android:layout_marginStart="40dp"
|
>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="餐费"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_eat"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:inputType="numberDecimal"
|
android:textColorHint="#6b000000"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.eat}"
|
android:textSize="16sp"
|
android:enabled="false"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_eat"
|
app:layout_constraintStart_toStartOf="@id/et_eat"
|
app:layout_constraintBottom_toBottomOf="@id/et_eat"
|
app:layout_constraintEnd_toEndOf="@id/et_eat"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
</LinearLayout>
|
</LinearLayout>
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="12dp"
|
>
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:orientation="vertical"
|
>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="住宿"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_stay"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:inputType="numberDecimal"
|
android:textColorHint="#6b000000"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.stay}"
|
android:textSize="16sp"
|
android:enabled="false"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_stay"
|
app:layout_constraintStart_toStartOf="@id/et_stay"
|
app:layout_constraintBottom_toBottomOf="@id/et_stay"
|
app:layout_constraintEnd_toEndOf="@id/et_stay"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</LinearLayout>
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:orientation="vertical"
|
android:layout_marginStart="40dp"
|
>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="交通"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_traffic"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:inputType="numberDecimal"
|
android:textColorHint="#6b000000"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.traffic}"
|
android:textSize="16sp"
|
android:enabled="false"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_traffic"
|
app:layout_constraintStart_toStartOf="@id/et_traffic"
|
app:layout_constraintBottom_toBottomOf="@id/et_traffic"
|
app:layout_constraintEnd_toEndOf="@id/et_traffic"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</LinearLayout>
|
</LinearLayout>
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="12dp"
|
>
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:orientation="vertical"
|
>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="门票"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_entrance"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:inputType="numberDecimal"
|
android:textColorHint="#6b000000"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.entrance}"
|
android:textSize="16sp"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:enabled="false"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_entrance"
|
app:layout_constraintStart_toStartOf="@id/et_entrance"
|
app:layout_constraintBottom_toBottomOf="@id/et_entrance"
|
app:layout_constraintEnd_toEndOf="@id/et_entrance"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</LinearLayout>
|
<LinearLayout
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:orientation="vertical"
|
android:layout_marginStart="40dp"
|
>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="购物"
|
android:textColor="#767375"
|
android:textSize="12sp"
|
/>
|
<androidx.constraintlayout.widget.ConstraintLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
>
|
<EditText
|
android:id="@+id/et_shopping"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:inputType="numberDecimal"
|
android:textColorHint="#6b000000"
|
android:textColor="#DE000000"
|
android:text="@={viewModel.beanLiveData.shopping}"
|
android:textSize="16sp"
|
android:hint="@{viewModel.typeLiveData?`0`:``}"
|
android:enabled="false"
|
android:backgroundTint="#6B000000"
|
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
/>
|
<View
|
android:layout_width="0dp"
|
android:layout_height="0dp"
|
android:background="@color/color_non_editable"
|
app:layout_constraintTop_toTopOf="@id/et_shopping"
|
app:layout_constraintStart_toStartOf="@id/et_shopping"
|
app:layout_constraintBottom_toBottomOf="@id/et_shopping"
|
app:layout_constraintEnd_toEndOf="@id/et_shopping"
|
android:visibility="@{viewModel.typeLiveData}"
|
/>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</LinearLayout>
|
</LinearLayout>
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="14dp"
|
android:gravity="center_vertical"
|
>
|
<TextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:text="每日详细消费记录"
|
android:textSize="20sp"
|
android:textColor="@color/black"
|
/>
|
<ImageView
|
android:id="@+id/iv_add_daily_consume_record"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:background="@{viewModel.typeLiveData?@drawable/ic_tourism_add:null}"
|
/>
|
|
</LinearLayout>
|
<RelativeLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="10dp"
|
>
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv_daily_consume_record"
|
android:orientation="vertical"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
/>
|
</RelativeLayout>
|
|
|
</LinearLayout>
|
</ScrollView>
|
|
|
</LinearLayout>
|
</layout>
|