点测量、放样页面UI调整

main
chenglifeng 7 months ago
parent dc800ea759
commit 9b5bbbb1de
  1. 40
      app/src/main/java/com/project/survey/adapter/LoftingListAdapter.java
  2. 45
      app/src/main/java/com/project/survey/adapter/PointMeasureListAdapter.java
  3. 22
      app/src/main/java/com/project/survey/network/RetrofitClient.kt
  4. 20
      app/src/main/java/com/project/survey/ui/MainActivity.kt
  5. 10
      app/src/main/java/com/project/survey/ui/home/HomeFragment.kt
  6. 6
      app/src/main/java/com/project/survey/ui/home/InstrumentFragment.kt
  7. 8
      app/src/main/java/com/project/survey/ui/home/MeFragment.kt
  8. 46
      app/src/main/java/com/project/survey/ui/lofting/LoftingListActivity.kt
  9. 28
      app/src/main/java/com/project/survey/ui/lofting/adapter/LoftingListAdapter.kt
  10. 30
      app/src/main/java/com/project/survey/ui/pointmeasure/PointMeasureListActivity.kt
  11. 66
      app/src/main/java/com/project/survey/ui/pointmeasure/PointMeasureListFragment.kt
  12. 29
      app/src/main/java/com/project/survey/ui/pointmeasure/adapter/PointMeasureListAdapter.kt
  13. 7
      app/src/main/java/com/project/survey/ui/project/ProjectListActivity.kt
  14. 2
      app/src/main/res/color/text_color_selector_blue_black.xml
  15. 1
      app/src/main/res/layout/activity_base_survey_new.xml
  16. 30
      app/src/main/res/layout/activity_lofting_list.xml
  17. 25
      app/src/main/res/layout/activity_point_measure_list.xml
  18. 7
      app/src/main/res/layout/fragment_point_measure_list.xml
  19. 3
      app/src/main/res/layout/item_approval_approved.xml
  20. 140
      app/src/main/res/layout/item_lofting_list.xml
  21. 187
      app/src/main/res/layout/item_point_measure_list.xml

@ -1,40 +0,0 @@
package com.project.survey.adapter;
import android.content.Context;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import com.project.survey.adapter.base.BaseAdapter;
import com.project.survey.adapter.viewholder.LoftingListViewHolder;
import com.project.survey.databinding.ItemLoftingListBinding;
import com.project.survey.model.LoftingListBean;
import com.project.survey.ui.lofting.pointlofting.PointStakingActivity;
/**
* 放样列表
*/
public class LoftingListAdapter extends BaseAdapter<LoftingListViewHolder, LoftingListBean> {
private final Context context;
public LoftingListAdapter(Context context) {
super(context);
this.context = context;
}
@NonNull
@Override
public LoftingListViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new LoftingListViewHolder(ItemLoftingListBinding.inflate(getInflater(), parent, false));
}
@Override
protected void onBindViewHolderDo(LoftingListViewHolder holder, int position) {
holder.mBinding.tvProjectMeasured.setOnClickListener(v -> {
PointStakingActivity.start(context);
});
}
}

@ -1,45 +0,0 @@
package com.project.survey.adapter;
import android.content.Context;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import com.project.survey.adapter.base.BaseAdapter;
import com.project.survey.adapter.viewholder.PointMeasureListViewHolder;
import com.project.survey.databinding.ItemPointMeasureListBinding;
import com.project.survey.model.PointMeasureListBean;
import com.project.survey.ui.pointmeasure.measure.PointSurveyNewActivity;
/**
* 点测量列表
*/
public class PointMeasureListAdapter extends BaseAdapter<PointMeasureListViewHolder, PointMeasureListBean> {
private final Context context;
private final String type;
public PointMeasureListAdapter(Context context, String type) {
super(context);
this.context = context;
this.type = type;
}
@NonNull
@Override
public PointMeasureListViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new PointMeasureListViewHolder(ItemPointMeasureListBinding.inflate(getInflater(), parent, false));
}
@Override
protected void onBindViewHolderDo(PointMeasureListViewHolder holder, int position) {
//进入测量
holder.mBinding.tvProjectMeasured.setOnClickListener(v -> {
PointSurveyNewActivity.start(context);
});
}
}

@ -69,21 +69,21 @@ object RetrofitClient {
val newRequest = builder.url(newHttpUrl).build()
return@addInterceptor chain.proceed(newRequest)
}
.addInterceptor { chain ->
val token = SPUtils.getString(SPConstants.TOKEN) ?: ""
val builder = chain.request().newBuilder().apply {
removeHeader("Authorization")
if (token.isNotBlank()) {
addHeader("Authorization", token)
}
}
return@addInterceptor chain.proceed(builder.build())
}
// .addInterceptor { chain ->
// val token = SPUtils.getString(SPConstants.TOKEN) ?: ""
// val builder = chain.request().newBuilder().apply {
// removeHeader("Authorization")
// if (token.isNotBlank()) {
// addHeader("Authorization", token)
// }
// }
// return@addInterceptor chain.proceed(builder.build())
// }
.addInterceptor(HttpLoggingInterceptor().apply {
level = if (BuildConfig.DEBUG)
HttpLoggingInterceptor.Level.BODY
else
HttpLoggingInterceptor.Level.BODY
HttpLoggingInterceptor.Level.NONE
})
.sslSocketFactory(
HttpsTrustUtil.createSSLSocketFactory(),

@ -1,20 +1,18 @@
package com.project.survey.ui
import android.view.KeyEvent
import androidx.activity.viewModels
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter
import androidx.viewpager.widget.ViewPager
import blankj.utilcode.util.AppUtils
import blankj.utilcode.util.LogUtils
import com.bingce.AppChannel
import com.bingce.ui.TabEntity
import com.bingce.utils.AppUtil
import com.bingce.utils.RegisterUtil
import com.bingce.utils.SdkUtils
import com.flyco.tablayout.listener.OnTabSelectListener
import com.project.survey.BuildConfig
import com.project.survey.R
import com.project.survey.databinding.ActivityMainBinding
import com.project.survey.extend.toast
import com.project.survey.logic.viewmodel.MainViewModel
import com.project.survey.ui.base.BaseBindingActivity
import com.project.survey.ui.home.HomeFragment
@ -119,5 +117,19 @@ class MainActivity : BaseBindingActivity<ActivityMainBinding>() {
})
}
private var exitTime: Long = 0
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
if (keyCode == KeyEvent.KEYCODE_BACK){
if ((System.currentTimeMillis() - exitTime) > 2000) {
toast("再按一次退出程序")
exitTime = System.currentTimeMillis()
} else {
finish()
}
return true
}
return super.onKeyDown(keyCode, event)
}
}

@ -42,19 +42,19 @@ class HomeFragment : BaseBindingFragment<FragmentHomeBinding>() {
}
private fun updateViewByData() {
val currentProject =
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
mBinding.tvProject.text = currentProject?.XMXX_NAME
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)?.let {
mBinding.tvProject.text = it.XMXX_NAME
}
}
override fun initListener() {
//点测量
mBinding.itemPointMeasure.setOnClickNoRepeatListener {
PointMeasureListActivity.launch(requireContext())
PointMeasureListActivity.start()
}
//放样
mBinding.itemLofting.setOnClickNoRepeatListener {
LoftingListActivity.launch(mContext)
LoftingListActivity.start()
}
mBinding.itemToBeProcessed.setOnClickNoRepeatListener {
ApprovalActivity.start(ApprovalActivity.PI_PREAPPROV)

@ -56,9 +56,9 @@ class InstrumentFragment : BaseBindingFragment<FragmentInstrumentBinding>() {
}
private fun updateViewByData() {
val currentProject =
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
mBinding.tvProject.text = currentProject?.XMXX_NAME
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)?.let {
mBinding.tvProject.text = it.XMXX_NAME
}
}
override fun initListener() {

@ -44,15 +44,15 @@ class MeFragment : BaseBindingFragment<FragmentMeBinding>() {
}
}
mBinding.tvName.text = SPUtils.getString(SPConstants.ACCOUNT)
mBinding.tvVersion.text = BuildConfig.VERSION_NAME
mBinding.tvVersion.text = "v${BuildConfig.VERSION_NAME}"
updateViewByData()
}
private fun updateViewByData() {
val currentProject =
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)
mBinding.tvProject.text = currentProject?.XMXX_NAME
SPUtils.getParcelable(SPConstants.CURRENT_PROJECT, ProjectBean::class.java)?.let {
mBinding.tvProject.text = it.XMXX_NAME
}
}
override fun initListener() {

@ -1,46 +1,33 @@
package com.project.survey.ui.lofting
import android.content.Context
import android.content.Intent
import com.gyf.immersionbar.ImmersionBar
import com.project.survey.adapter.LoftingListAdapter
import com.project.survey.R
import com.project.survey.databinding.ActivityLoftingListBinding
import com.project.survey.model.LoftingListBean
import com.project.survey.ui.base.BaseBindingActivity
import com.project.survey.ui.lofting.adapter.LoftingListAdapter
import com.project.survey.ui.lofting.pointlofting.PointStakingActivity
import com.project.survey.util.ActivityNavUtil
import com.project.survey.widget.decoration.TransparentDividerDecoration
class LoftingListActivity : BaseBindingActivity<ActivityLoftingListBinding>() {
private val adapter by lazy { LoftingListAdapter(this) }
private val adapter by lazy { LoftingListAdapter() }
companion object {
fun launch(context: Context) {
context.startActivity(Intent(context, LoftingListActivity::class.java))
fun start() {
ActivityNavUtil.startActivity<LoftingListActivity> { }
}
}
override fun getBinding(): ActivityLoftingListBinding {
return ActivityLoftingListBinding.inflate(layoutInflater)
}
override fun getBinding(): ActivityLoftingListBinding =
ActivityLoftingListBinding.inflate(layoutInflater)
override fun initView() {
ImmersionBar.with(this)
.statusBarDarkFont(true)
.titleBarMarginTop(mBinding.ilToolBar.toolbar)
.init()
setSupportActionBar(mBinding.ilToolBar.toolbar)
initAdapter()
}
immersionToolbar(mBinding.toolbar, R.string.lofting)
private fun initAdapter() {
mBinding.recyclerView.addItemDecoration(TransparentDividerDecoration(this))
adapter.setOnItemClickListener {
}
mBinding.recyclerView.setAdapter(adapter)
adapter.isStateViewEnable = true
}
override fun initData() {
@ -48,10 +35,19 @@ class LoftingListActivity : BaseBindingActivity<ActivityLoftingListBinding>() {
for (i in 0 until 3) {
dataList.add(LoftingListBean())
}
adapter.refreshData(dataList)
adapter.submitList(dataList)
}
override fun initListener() {
// 搜索
mBinding.searchWidget.setOnEditorSearchListener {
}
// 放样
adapter.addOnItemChildClickListener(R.id.tvLofting) { _, _, position ->
adapter.getItem(position)?.let { bean ->
PointStakingActivity.start(this)
}
}
}
}

@ -0,0 +1,28 @@
package com.project.survey.ui.lofting.adapter
import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.project.survey.R
class LoftingListAdapter : BaseQuickAdapter<Any, QuickViewHolder>() {
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: Any?) {
item?.let { bean ->
holder.setText(R.id.tvWorkName, "作业名称")
.setText(R.id.tvWorkDesc, "作业内容内容内容")
.setText(R.id.tvCreateTime, "2022-05-17 10:58:48")
.setText(R.id.tvProjectName, "单位-分部-分项 3个名称合并显示")
.setText(R.id.tvSurveyor, "丁汉臻")
}
}
override fun onCreateViewHolder(
context: Context,
parent: ViewGroup,
viewType: Int
): QuickViewHolder {
return QuickViewHolder(R.layout.item_lofting_list, parent)
}
}

@ -1,13 +1,11 @@
package com.project.survey.ui.pointmeasure
import android.content.Context
import android.content.Intent
import android.view.View
import androidx.core.os.bundleOf
import com.gyf.immersionbar.ImmersionBar
import com.project.survey.R
import com.project.survey.databinding.ActivityPointMeasureListBinding
import com.project.survey.ui.base.BaseBindingActivity
import com.project.survey.util.ActivityNavUtil
/**
* 点测量列表
@ -20,24 +18,24 @@ class PointMeasureListActivity : BaseBindingActivity<ActivityPointMeasureListBin
const val TYPE_SURVEY_PLAN = "TYPE_SURVEY_PLAN"//测量计划
const val TYPE_PROJECT_MEASURE = "TYPE_PROJECT_MEASURE"//工程计量
fun launch(context: Context) {
context.startActivity(Intent(context, PointMeasureListActivity::class.java))
fun start() {
ActivityNavUtil.startActivity<PointMeasureListActivity> { }
}
}
override fun getBinding(): ActivityPointMeasureListBinding {
return ActivityPointMeasureListBinding.inflate(layoutInflater)
}
override fun getBinding(): ActivityPointMeasureListBinding =
ActivityPointMeasureListBinding.inflate(layoutInflater)
override fun initView() {
ImmersionBar.with(this)
.statusBarDarkFont(true)
.titleBarMarginTop(mBinding.ilToolBar.toolbar)
.init()
setSupportActionBar(mBinding.ilToolBar.toolbar)
immersionToolbar(mBinding.toolbar, R.string.point_measure)
}
override fun initListener() {
// 搜索
mBinding.searchWidget.setOnEditorSearchListener {
}
mBinding.tvAll.setOnClickListener {
loadFirstPage()
}
@ -52,11 +50,11 @@ class PointMeasureListActivity : BaseBindingActivity<ActivityPointMeasureListBin
}
private fun switchFragment(type: String) {
val frament = PointMeasureListFragment()
frament.arguments = bundleOf(KEY_TYPE to type)
// val frament = PointMeasureListFragment()
// frament.arguments = bundleOf(KEY_TYPE to type)
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.container, frament)
transaction.replace(R.id.container, PointMeasureListFragment.newInstance(type))
transaction.commit()
}

@ -2,39 +2,41 @@ package com.project.survey.ui.pointmeasure
import android.view.LayoutInflater
import android.view.ViewGroup
import com.project.survey.adapter.PointMeasureListAdapter
import androidx.core.os.bundleOf
import androidx.fragment.app.Fragment
import com.project.survey.R
import com.project.survey.databinding.FragmentPointMeasureListBinding
import com.project.survey.extend.toast
import com.project.survey.model.PointMeasureListBean
import com.project.survey.ui.base.BaseFragmentBinding
import com.project.survey.ui.base.BaseBindingFragment
import com.project.survey.ui.pointmeasure.adapter.PointMeasureListAdapter
import com.project.survey.ui.pointmeasure.measure.PointSurveyNewActivity
import com.project.survey.widget.decoration.TransparentDividerDecoration
class PointMeasureListFragment : BaseFragmentBinding<FragmentPointMeasureListBinding>() {
class PointMeasureListFragment : BaseBindingFragment<FragmentPointMeasureListBinding>() {
private val adapter by lazy {
PointMeasureListAdapter(
requireContext(),
getType()
)
companion object {
const val TYPE = "type"
fun newInstance(type: String): Fragment {
return PointMeasureListFragment().apply {
arguments = bundleOf(TYPE to type)
}
}
}
override fun getViewBinding(
override fun getBinding(
inflater: LayoutInflater,
container: ViewGroup?
): FragmentPointMeasureListBinding {
return FragmentPointMeasureListBinding.inflate(inflater, container, false)
}
override fun initView() {
initAdapter()
}
): FragmentPointMeasureListBinding =
FragmentPointMeasureListBinding.inflate(inflater, container, false)
private fun initAdapter() {
mBinding.recyclerView.addItemDecoration(TransparentDividerDecoration(requireContext()))
adapter.setOnItemClickListener {
private val adapter by lazy { PointMeasureListAdapter() }
}
override fun initView() {
mBinding.recyclerView.addItemDecoration(TransparentDividerDecoration(mContext))
mBinding.recyclerView.setAdapter(adapter)
adapter.isStateViewEnable = true
}
override fun initData() {
@ -42,8 +44,26 @@ class PointMeasureListFragment : BaseFragmentBinding<FragmentPointMeasureListBin
for (i in 0 until 3) {
dataList.add(PointMeasureListBean())
}
adapter.refreshData(dataList)
adapter.submitList(dataList)
}
override fun initListener() {
// 生成报验单
adapter.addOnItemChildClickListener(R.id.tvGenerateForm) { _, _, position ->
toast("生成报验单:$position")
}
// 结束测量
adapter.addOnItemChildClickListener(R.id.tvStopMeasure) { _, _, position ->
toast("结束测量:$position")
}
// 进入测量
adapter.addOnItemChildClickListener(R.id.tvEnterMeasure) { _, _, position ->
adapter.getItem(position)?.let { bean ->
PointSurveyNewActivity.start(mContext)
}
}
}
private fun getType() = getArgumentString(PointMeasureListActivity.KEY_TYPE)
}

@ -0,0 +1,29 @@
package com.project.survey.ui.pointmeasure.adapter
import android.content.Context
import android.view.ViewGroup
import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.project.survey.R
class PointMeasureListAdapter : BaseQuickAdapter<Any, QuickViewHolder>() {
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: Any?) {
item?.let { bean ->
holder.setText(R.id.tvName, "测量单位报审(验)单")
.setText(R.id.tvNO, "XMBH2021-0000-$position")
.setText(R.id.tvType, "测量类型")
.setText(R.id.tvProjectName, "单位-分部-分项$position")
.setText(R.id.tvMeasureContent, "内容名称")
.setText(R.id.tvApplyUser, "张三")
}
}
override fun onCreateViewHolder(
context: Context,
parent: ViewGroup,
viewType: Int
): QuickViewHolder {
return QuickViewHolder(R.layout.item_point_measure_list, parent)
}
}

@ -59,7 +59,6 @@ class ProjectListActivity : BaseBindingActivity<ActivityProjectListBinding>(), O
mBinding.recyclerView.addItemDecoration(HorDividerDecoration(this))
mBinding.recyclerView.setAdapter(adapter)
adapter.isStateViewEnable = true
adapter.setStateViewLayout(this, R.layout.layout_no_data)
}
override fun initData() {
@ -68,7 +67,11 @@ class ProjectListActivity : BaseBindingActivity<ActivityProjectListBinding>(), O
}
viewModel.projectResponse.observe(this) {
mBinding.smartRefreshLayout.smartDismiss()
adapter.submitList(it)
if (it.isNotEmpty()) {
adapter.submitList(it)
} else {
adapter.setStateViewLayout(this, R.layout.layout_no_data)
}
}
fetchData()
}

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/colorPrimary" android:state_selected="true" />
<item android:color="@color/text_color_1" android:state_selected="false" />
<item android:color="@color/text_color_20" android:state_selected="false" />
</selector>

@ -330,6 +330,7 @@
android:id="@+id/rl_more"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:visibility="gone"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="15dp">

@ -1,21 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<include
android:id="@+id/ilToolBar"
layout="@layout/sh_toolbar" />
<!-- <include-->
<!-- android:id="@+id/ilToolBar"-->
<!-- layout="@layout/sh_toolbar" />-->
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@color/transparent"
app:navigationIcon="@drawable/icon_toolbar_back"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:titleCentered="true"
app:titleTextAppearance="@style/ToolbarTextAppearance" />
<include layout="@layout/item_search" />
<!-- <include layout="@layout/item_search" />-->
<com.project.survey.widget.SearchWidget
android:id="@+id/searchWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:sw_hint="作业名称、作业描述、分项工程名称" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/sw_12dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
android:padding="12dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/item_lofting_list" />
</LinearLayout>

@ -1,14 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical">
<include
android:id="@+id/ilToolBar"
layout="@layout/sh_toolbar" />
<!-- <include-->
<!-- android:id="@+id/ilToolBar"-->
<!-- layout="@layout/sh_toolbar" />-->
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@color/transparent"
app:navigationIcon="@drawable/icon_toolbar_back"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:titleCentered="true"
app:titleTextAppearance="@style/ToolbarTextAppearance" />
<!-- <include layout="@layout/item_search" />-->
<include layout="@layout/item_search" />
<com.project.survey.widget.SearchWidget
android:id="@+id/searchWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:sw_hint="流程名称、编号、申请人" />
<LinearLayout
android:layout_width="match_parent"

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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">
@ -8,7 +9,9 @@
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/sw_12dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
android:padding="12dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/item_point_measure_list" />
</LinearLayout>

@ -6,7 +6,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:background="@drawable/bg_white_round_4"
android:padding="12dp">
android:padding="12dp"
tools:layout_editor_absoluteX="12dp">
<TextView
android:id="@+id/tvName"

@ -1,74 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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="wrap_content"
android:background="@drawable/bg_white_round_4"
android:orientation="vertical"
android:padding="@dimen/sw_12dp">
android:padding="12dp">
<TextView
android:id="@+id/tvWorkName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="作业名称"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_13sp"
android:textStyle="bold" />
android:textColor="@color/text_color_20"
android:textSize="13sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="作业名称" />
<TextView
android:id="@+id/tvWorkDescKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_12dp"
android:text="作业描述:内容"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_12sp" />
android:layout_marginTop="12dp"
android:text="作&#8194;&#8194;&#8194;&#8194;:"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvWorkName" />
<TextView
android:id="@+id/tvWorkDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_4dp"
android:text="创建时间:2022-05-17 10:58:48"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_12sp" />
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvWorkDescKey"
app:layout_constraintStart_toEndOf="@id/tvWorkDescKey"
tools:text="内容" />
<TextView
android:id="@+id/tvCreateTimeKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_4dp"
android:text="分项工程名称:单位-分部-分项 3个名称合并显示"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_12sp" />
android:layout_marginTop="4dp"
android:text="创&#8194;&#8194;&#8194;&#8194;:"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvWorkDescKey" />
<TextView
android:id="@+id/tvCreateTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_4dp"
android:layout_marginBottom="@dimen/sw_10dp"
android:text="测量员:丁汉臻"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_12sp" />
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvCreateTimeKey"
app:layout_constraintStart_toEndOf="@id/tvCreateTimeKey"
tools:text="2022-05-17 10:58:48" />
<include layout="@layout/line_hor" />
<TextView
android:id="@+id/tvProjectNameKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="分项工程名称:"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCreateTimeKey" />
<LinearLayout
android:layout_width="match_parent"
<TextView
android:id="@+id/tvProjectName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvProjectNameKey"
app:layout_constraintStart_toEndOf="@id/tvProjectNameKey"
tools:text="单位-分部-分项 3个名称合并显示" />
<TextView
android:id="@+id/tvSurveyorKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_10dp"
android:gravity="end"
android:orientation="horizontal">
android:layout_marginTop="4dp"
android:text="测&#12288;&#8194;&#12288;&#8194;员:"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvProjectNameKey" />
<TextView
android:id="@+id/tvProjectMeasured"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/sw_11dp"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="@dimen/sw_28dp"
android:paddingVertical="@dimen/sw_6dp"
android:text="@string/lofting"
android:textColor="@color/text_color_selector_blue_black"
android:textSize="@dimen/sw_12sp" />
<TextView
android:id="@+id/tvSurveyor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvSurveyorKey"
app:layout_constraintStart_toEndOf="@id/tvSurveyorKey"
tools:text="丁汉臻" />
</LinearLayout>
<View
android:id="@+id/viewLine"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="10dp"
android:background="@color/c_ebebeb"
app:layout_constraintTop_toBottomOf="@id/tvSurveyorKey" />
<TextView
android:id="@+id/tvLofting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="28dp"
android:paddingVertical="6dp"
android:text="@string/lofting"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/viewLine" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,106 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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="wrap_content"
android:background="@drawable/bg_white_round_4"
android:orientation="vertical"
android:padding="@dimen/sw_12dp">
android:padding="12dp">
<TextView
android:id="@+id/tvName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="测量单位报审(验)单"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_13sp" />
android:textColor="@color/text_color_20"
android:textSize="13sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="测量单位报审(验)单" />
<TextView
android:id="@+id/tvNO"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="XMBH2021-00001"
android:textColor="@color/text_color_2"
android:textSize="@dimen/sw_12sp" />
android:textColor="@color/text_color_727778"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvName"
tools:text="XMBH2021-00001" />
<TextView
android:id="@+id/tvType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_5dp"
android:layout_marginTop="5dp"
android:background="@drawable/bg_approval_blue_stroke"
android:paddingHorizontal="@dimen/sw_4dp"
android:paddingVertical="@dimen/sw_1dp"
android:text="测量类型"
android:paddingHorizontal="4dp"
android:paddingVertical="1dp"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/sw_10sp" />
android:textSize="10sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvNO"
tools:text="测量类型" />
<TextView
android:id="@+id/tvProjectNameKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_12dp"
android:text="分项工程名称:单位-分部-分项3个名称合并显示"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_12sp" />
android:layout_marginTop="12dp"
android:text="分项工程名称:"
android:textColor="@color/text_color_404145"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvType" />
<TextView
android:id="@+id/tvProjectName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_4dp"
android:text="测量内容:内容名称"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_12sp" />
android:textColor="@color/text_color_404145"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvProjectNameKey"
app:layout_constraintStart_toEndOf="@id/tvProjectNameKey"
tools:text="单位-分部-分项3个名称合并显示" />
<TextView
android:id="@+id/tvMeasureContentKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_4dp"
android:layout_marginBottom="@dimen/sw_10dp"
android:text="申请人:丁汉臻"
android:textColor="@color/text_color_1"
android:textSize="@dimen/sw_12sp" />
android:layout_marginTop="4dp"
android:text="测&#8194;&#8194;&#8194;&#8194;:"
android:textColor="@color/text_color_404145"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvProjectNameKey" />
<include layout="@layout/line_hor" />
<TextView
android:id="@+id/tvMeasureContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_color_404145"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvMeasureContentKey"
app:layout_constraintStart_toEndOf="@id/tvMeasureContentKey"
tools:text="内容名称" />
<LinearLayout
android:layout_width="match_parent"
<TextView
android:id="@+id/tvApplyUserKey"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="申&#12288;&#8194;&#12288;&#8194;人:"
android:textColor="@color/text_color_404145"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMeasureContentKey" />
<TextView
android:id="@+id/tvApplyUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/sw_10dp"
android:gravity="end"
android:orientation="horizontal">
android:textColor="@color/text_color_404145"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvApplyUserKey"
app:layout_constraintStart_toEndOf="@id/tvApplyUserKey"
tools:text="丁汉臻" />
<TextView
android:id="@+id/tvAll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="@dimen/sw_11dp"
android:paddingVertical="@dimen/sw_5dp"
android:text="生成报验单"
android:textColor="@color/text_color_selector_blue_black"
android:textSize="@dimen/sw_12sp" />
<View
android:id="@+id/viewLine"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="10dp"
android:background="@color/c_ebebeb"
app:layout_constraintTop_toBottomOf="@id/tvApplyUserKey" />
<TextView
android:id="@+id/tvSurveyPlan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/sw_11dp"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="@dimen/sw_11dp"
android:paddingVertical="@dimen/sw_5dp"
android:text="结束测量"
android:textColor="@color/text_color_selector_blue_black"
android:textSize="@dimen/sw_12sp" />
<TextView
android:id="@+id/tvGenerateForm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="16dp"
android:paddingVertical="6dp"
android:text="生成报验单"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvEnterMeasure"
app:layout_constraintEnd_toStartOf="@id/tvStopMeasure" />
<TextView
android:id="@+id/tvProjectMeasured"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/sw_11dp"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="@dimen/sw_11dp"
android:paddingVertical="@dimen/sw_5dp"
android:text="进入测量"
android:textColor="@color/text_color_selector_blue_black"
android:textSize="@dimen/sw_12sp" />
<TextView
android:id="@+id/tvStopMeasure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="16dp"
android:paddingVertical="6dp"
android:text="结束测量"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintBaseline_toBaselineOf="@id/tvEnterMeasure"
app:layout_constraintEnd_toStartOf="@id/tvEnterMeasure" />
</LinearLayout>
<TextView
android:id="@+id/tvEnterMeasure"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/bg_point_measure_selector"
android:paddingHorizontal="16dp"
android:paddingVertical="6dp"
android:text="进入测量"
android:textColor="@color/text_color_20"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/viewLine" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

Loading…
Cancel
Save