feat: 新增航班管理列表页并支持时间格式化与跨日"+1"显示
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,12 +3,15 @@ package com.lukouguoji.aerologic.page.flight.query.details
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityFlightQueryDetailsBinding
|
||||
import com.lukouguoji.aerologic.databinding.ActivityGnjStashDetailsBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)
|
||||
class FlightQueryDetailsActivity :
|
||||
BaseBindingActivity<ActivityFlightQueryDetailsBinding, FlightQueryDetailsViewModel>() {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
|
||||
@Deprecated("使用 module_hangban 中的 HbQueryListActivity 替代")
|
||||
class FlightQueryListActivity :
|
||||
BaseBindingActivity<ActivityFlightQueryListBinding, FlightQueryListViewModel>() {
|
||||
override fun layoutId() = R.layout.activity_flight_query_list
|
||||
|
||||
@@ -106,7 +106,9 @@ class HomeFragment : Fragment() {
|
||||
if (Constant.AuthName.Flight == leftMenuTemp.id) {
|
||||
// ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY)
|
||||
// .navigation(activity, Constant.RequestCode.home_left_hang_ban_query)
|
||||
FlightQueryListActivity.start(requireContext())
|
||||
// FlightQueryListActivity.start(requireContext()) // 已废弃
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HB_QUERY_LIST)
|
||||
.navigation()
|
||||
mPosition = oldPosition
|
||||
}
|
||||
//货物查询
|
||||
|
||||
@@ -151,6 +151,46 @@ class FlightBean : ICheck {
|
||||
).noNull(scheduledTackOff)
|
||||
}
|
||||
|
||||
// 预计起飞时间-时分
|
||||
val estimatedTakeOffHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
estimatedTakeOff,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(estimatedTakeOff)
|
||||
}
|
||||
|
||||
// 计划降落时间-时分
|
||||
val scheduledArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
scheduledArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(scheduledArrival)
|
||||
}
|
||||
|
||||
// 预计降落时间-时分
|
||||
val estimatedArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
estimatedArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(estimatedArrival)
|
||||
}
|
||||
|
||||
// 实际降落时间-时分
|
||||
val actualArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
actualArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(actualArrival)
|
||||
}
|
||||
|
||||
// 航班服务种类(0:客机;1:货机;2:卡车)
|
||||
var serviceType: String = ""
|
||||
|
||||
@@ -219,6 +259,50 @@ class FlightBean : ICheck {
|
||||
return calendar.get(Calendar.DAY_OF_YEAR) > current.get(Calendar.DAY_OF_YEAR)
|
||||
}
|
||||
|
||||
// 预计起飞 vs 计划起飞 是否跨日
|
||||
fun isEstimatedTakeOffNextDay(): Boolean {
|
||||
if (scheduledTackOff.isEmpty() || estimatedTakeOff.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedTakeOff))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 实际起飞 vs 计划起飞 是否跨日
|
||||
fun isActualTakeOffNextDay(): Boolean {
|
||||
if (scheduledTackOff.isEmpty() || actualTakeOff.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualTakeOff))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 预计降落 vs 计划降落 是否跨日
|
||||
fun isEstimatedArrivalNextDay(): Boolean {
|
||||
if (scheduledArrival.isEmpty() || estimatedArrival.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedArrival))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 实际降落 vs 计划降落 是否跨日
|
||||
fun isActualArrivalNextDay(): Boolean {
|
||||
if (scheduledArrival.isEmpty() || actualArrival.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualArrival))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
fun getCargoTypeName(): String {
|
||||
return when (cargoType) {
|
||||
"0" -> "国际货"
|
||||
|
||||
@@ -184,8 +184,10 @@ object ARouterConstants {
|
||||
/**
|
||||
* 航班查询模块
|
||||
*/
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块(旧版)
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块(旧版)
|
||||
const val ACTIVITY_URL_HB_QUERY_LIST = "/hb/HbQueryListActivity" //航班管理 列表(新版)
|
||||
const val ACTIVITY_URL_FLIGHT_QUERY_DETAILS = "/app/FlightQueryDetailsActivity" //航班详情
|
||||
|
||||
///////////////// 货物追踪模块
|
||||
/**
|
||||
|
||||
@@ -30,7 +30,8 @@ import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY)
|
||||
// @Route(path = ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY) // 已废弃,使用 HbQueryListActivity
|
||||
@Deprecated("使用 HbQueryListActivity 替代")
|
||||
class HangBanQueryActivity : BaseActivity(), View.OnClickListener {
|
||||
private val currentTitleName = "航班查询"
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.lukouguoji.hangban.page.query.list
|
||||
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.hangban.R
|
||||
import com.lukouguoji.hangban.databinding.ActivityHbQueryListBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_HB_QUERY_LIST)
|
||||
class HbQueryListActivity :
|
||||
BaseBindingActivity<ActivityHbQueryListBinding, HbQueryListViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_hb_query_list
|
||||
|
||||
override fun viewModelClass() = HbQueryListViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("航班管理")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
viewModel.pageModel
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.lukouguoji.hangban.page.query.list
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.hangban.databinding.ItemHbQueryListBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.FlightBean
|
||||
|
||||
class HbQueryListViewHolder(view: View) :
|
||||
BaseViewHolder<FlightBean, ItemHbQueryListBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item)!!
|
||||
binding.bean = bean
|
||||
|
||||
// 到达航班显示橙色
|
||||
val color = if (bean.beArrival()) {
|
||||
android.graphics.Color.parseColor("#FF8C00")
|
||||
} else {
|
||||
android.graphics.Color.parseColor("#333333")
|
||||
}
|
||||
setTextColorRecursive(binding.ll, color)
|
||||
|
||||
notifyItemClick(position, binding.ll)
|
||||
}
|
||||
|
||||
private fun setTextColorRecursive(view: View, color: Int) {
|
||||
if (view is android.widget.TextView) {
|
||||
view.setTextColor(color)
|
||||
} else if (view is android.view.ViewGroup) {
|
||||
for (i in 0 until view.childCount) {
|
||||
setTextColorRecursive(view.getChildAt(i), color)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.lukouguoji.hangban.page.query.list
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.lukouguoji.hangban.R
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.FlightBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import dev.utils.common.DateUtils
|
||||
|
||||
class HbQueryListViewModel : BasePageViewModel() {
|
||||
|
||||
val date = MutableLiveData(DateUtils.getCurrentTime().formatDate())
|
||||
val fNo = MutableLiveData("")
|
||||
val range = MutableLiveData("")
|
||||
val addressType = MutableLiveData("")
|
||||
val serviceType = MutableLiveData("")
|
||||
|
||||
val addressTypeList = MutableLiveData(listOf(KeyValue("全部", ""))).apply {
|
||||
DictUtils.getAreaTypeList {
|
||||
value = it
|
||||
}
|
||||
}
|
||||
val serviceTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("客机", "0"),
|
||||
KeyValue("货机", "1"),
|
||||
KeyValue("卡车", "2"),
|
||||
)
|
||||
)
|
||||
|
||||
val itemLayoutId = R.layout.item_hb_query_list
|
||||
val itemViewHolder = HbQueryListViewHolder::class.java
|
||||
|
||||
val count = MutableLiveData(0)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 方法区
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
override fun getData() {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getFlightList(
|
||||
mapOf(
|
||||
"page" to pageModel.page,
|
||||
"limit" to pageModel.limit,
|
||||
"fdate" to date.value,
|
||||
"fno" to fNo.value,
|
||||
"range" to range.value,
|
||||
"countryType" to addressType.value,
|
||||
"serviceType" to serviceType.value,
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
count.value = it.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
val bean = pageModel.rv!!.commonAdapter()!!.getItem(position) as FlightBean
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)
|
||||
.withString(Constant.Key.ID, bean.fid)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,6 +13,11 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".page.query.list.HbQueryListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
|
||||
141
module_hangban/src/main/res/layout/activity_hb_query_list.xml
Normal file
141
module_hangban/src/main/res/layout/activity_hb_query_list.xml
Normal file
@@ -0,0 +1,141 @@
|
||||
<?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>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.hangban.page.query.list.HbQueryListViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择航班日期"}'
|
||||
icon='@{@drawable/img_date}'
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.date}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入航班号"}'
|
||||
setTextAllCaps="@{true}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.fNo}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入航程"}'
|
||||
setTextAllCaps="@{true}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.range}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择地区类型"}'
|
||||
list="@{viewModel.addressTypeList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.addressType}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择服务类型"}'
|
||||
list="@{viewModel.serviceTypeList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.serviceType}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="24dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_hb_query_list" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 底部统计栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:"+viewModel.count+"条"}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:3条" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
284
module_hangban/src/main/res/layout/item_hb_query_list.xml
Normal file
284
module_hangban/src/main/res/layout/item_hb_query_list.xml
Normal file
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.FlightBean" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 左侧飞机图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班日期:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdate}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班号:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fno}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航程:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.range}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="地区类型:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.getCountryTypeName()}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="计划起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.scheduledTackOffHM}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="预计起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.estimatedTakeOffHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isEstimatedTakeOffNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实际起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.actualTakeOffHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isActualTakeOffNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="计划降落:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.scheduledArrivalHM}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="预计降落:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.estimatedArrivalHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isEstimatedArrivalNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实际降落:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.actualArrivalHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isActualArrivalNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/img_pda_right" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user