parent
15d773683d
commit
28fe174dde
14 changed files with 851 additions and 100 deletions
@ -0,0 +1,61 @@ |
|||||||
|
package com.bingce.controlnetwork.newui.adapter; |
||||||
|
|
||||||
|
import android.content.Context; |
||||||
|
import android.view.View; |
||||||
|
import android.view.ViewGroup; |
||||||
|
|
||||||
|
import androidx.annotation.NonNull; |
||||||
|
|
||||||
|
import com.bingce.controlapphelper.datasource.database.ProjectTypeValue; |
||||||
|
import com.bingce.controlapphelper.datasource.database.point.PointRecord; |
||||||
|
import com.bingce.controlnetwork.databinding.NewItemPointListBinding; |
||||||
|
import com.bingce.controlnetwork.newui.viewholder.PointListViewHolder; |
||||||
|
|
||||||
|
|
||||||
|
public class PointListAdapter extends BaseAdapterNew<PointListViewHolder, PointRecord> { |
||||||
|
|
||||||
|
private boolean isPlatCoordinate; |
||||||
|
private String projectType; |
||||||
|
|
||||||
|
public PointListAdapter(Context context) { |
||||||
|
super(context); |
||||||
|
} |
||||||
|
|
||||||
|
@NonNull |
||||||
|
@Override |
||||||
|
public PointListViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { |
||||||
|
return new PointListViewHolder(NewItemPointListBinding.inflate(getInflater(), parent, false)); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onBindViewHolderDo(PointListViewHolder holder, int position) { |
||||||
|
PointRecord pointRecordTj = mDataList.get(position); |
||||||
|
//num就是name 因为从天津拷贝过来的
|
||||||
|
holder.mBinding.tvPointNum.setText(pointRecordTj.getName()); |
||||||
|
// holder.mBinding.tvPointName.setText("");
|
||||||
|
|
||||||
|
if (ProjectTypeValue.LEVEL.equals(projectType)) { |
||||||
|
holder.mBinding.tvX.setVisibility(View.GONE); |
||||||
|
holder.mBinding.tvY.setVisibility(View.GONE); |
||||||
|
holder.mBinding.tvZ.setText("高程:" + pointRecordTj.getZ()); |
||||||
|
} else { |
||||||
|
if (isPlatCoordinate) { |
||||||
|
holder.mBinding.tvX.setText("X:" + pointRecordTj.getX()); |
||||||
|
holder.mBinding.tvY.setText("Y:" + pointRecordTj.getY()); |
||||||
|
holder.mBinding.tvZ.setText("Z:" + pointRecordTj.getZ()); |
||||||
|
} else { |
||||||
|
holder.mBinding.tvX.setText("经度:" + pointRecordTj.getLongitude()); |
||||||
|
holder.mBinding.tvY.setText("纬度:" + pointRecordTj.getLatitude()); |
||||||
|
holder.mBinding.tvZ.setText("高程:" + pointRecordTj.getZ()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public void setIsPlatCoordinate(boolean isPlatCoordinate) { |
||||||
|
this.isPlatCoordinate = isPlatCoordinate; |
||||||
|
} |
||||||
|
|
||||||
|
public void setProjectType(String projectType) { |
||||||
|
this.projectType = projectType; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,365 @@ |
|||||||
|
package com.bingce.controlnetwork.newui.createeditpoint |
||||||
|
|
||||||
|
import android.content.Context |
||||||
|
import android.content.Intent |
||||||
|
import android.text.TextUtils |
||||||
|
import android.view.View |
||||||
|
import androidx.annotation.StringRes |
||||||
|
import androidx.annotation.WorkerThread |
||||||
|
import androidx.lifecycle.lifecycleScope |
||||||
|
import blankj.utilcode.util.ToastUtils |
||||||
|
import com.bingce.controlapphelper.datasource.database.ProjectTypeValue |
||||||
|
import com.bingce.controlapphelper.datasource.database.SurveyorDatabaseFactory |
||||||
|
import com.bingce.controlapphelper.datasource.database.point.PointRecord |
||||||
|
import com.bingce.controlapphelper.model.BundleConstants |
||||||
|
import com.bingce.controlnetwork.R |
||||||
|
import com.bingce.controlnetwork.databinding.ActivityNewUiCreateEditPointBinding |
||||||
|
import com.bingce.controlnetwork.fragment.TipsFragment |
||||||
|
import com.bingce.controlnetwork.newui.base.BaseBindingActivity |
||||||
|
import kotlinx.coroutines.Dispatchers |
||||||
|
import kotlinx.coroutines.launch |
||||||
|
import kotlinx.coroutines.withContext |
||||||
|
|
||||||
|
/** |
||||||
|
* 新建或编辑点 |
||||||
|
*/ |
||||||
|
class CreateEditPointActvity : BaseBindingActivity<ActivityNewUiCreateEditPointBinding>() { |
||||||
|
|
||||||
|
private var editPoint: PointRecord? = null |
||||||
|
|
||||||
|
private var isKnown = false |
||||||
|
|
||||||
|
companion object { |
||||||
|
const val KEY_POINT_TYPE = "KEY_POINT_TYPE" |
||||||
|
const val KEY_EDIT_POINT = "KEY_EDIT_POINT" |
||||||
|
|
||||||
|
@JvmStatic |
||||||
|
fun launch( |
||||||
|
context: Context, |
||||||
|
projectId: String, |
||||||
|
projectType: String, |
||||||
|
pointType: String, |
||||||
|
eidtPoint: PointRecord? = null |
||||||
|
) { |
||||||
|
context.startActivity(Intent(context, CreateEditPointActvity::class.java).apply { |
||||||
|
putExtra(BundleConstants.KEY_PROJECT_ID, projectId) |
||||||
|
putExtra(BundleConstants.KEY_PROJECT_TYPE, projectType) |
||||||
|
putExtra(KEY_POINT_TYPE, pointType) |
||||||
|
putExtra(KEY_EDIT_POINT, eidtPoint) |
||||||
|
}) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
override fun getBinding(): ActivityNewUiCreateEditPointBinding { |
||||||
|
return ActivityNewUiCreateEditPointBinding.inflate(layoutInflater) |
||||||
|
} |
||||||
|
|
||||||
|
override fun initView() { |
||||||
|
mBinding.ilPointNum.tvTitle.setText(R.string.point_name) |
||||||
|
mBinding.ilPointNum.editText.setHint(R.string.please_enter_roll_call_optional) |
||||||
|
|
||||||
|
setBaseUi() |
||||||
|
initListener() |
||||||
|
} |
||||||
|
|
||||||
|
private fun initIntentData() { |
||||||
|
val pointType = getPointType() |
||||||
|
isKnown = |
||||||
|
PointRecord.TYPE_KNOWN_POINT == pointType || PointRecord.TYPE_GLOBAL_POINT == pointType |
||||||
|
editPoint = getEditPoint() |
||||||
|
} |
||||||
|
|
||||||
|
private fun initListener() { |
||||||
|
mBinding.tvSaveContinue.setOnClickListener { |
||||||
|
startSaveContinue() |
||||||
|
} |
||||||
|
mBinding.tvSaveQuit.setOnClickListener { |
||||||
|
startSaveQuite() |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private fun startSaveQuite() { |
||||||
|
checkSave { |
||||||
|
if (editPoint == null) { |
||||||
|
saveRecordForCreate { |
||||||
|
finish() |
||||||
|
} |
||||||
|
} else { |
||||||
|
saveRecordForEdit(editPoint!!) { |
||||||
|
finish() |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private fun startSaveContinue() { |
||||||
|
checkSave { |
||||||
|
saveRecordForCreate() |
||||||
|
clearContent() |
||||||
|
val nextPointNum = getNextPointNum() |
||||||
|
mBinding.ilPointNum.editText.setText(nextPointNum) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private fun checkSave(success: () -> Unit) { |
||||||
|
val pointNum = getPointNumber() |
||||||
|
if (TextUtils.isEmpty(pointNum)) { |
||||||
|
ToastUtils.showShort(R.string.please_enter_point_number) |
||||||
|
return |
||||||
|
} |
||||||
|
|
||||||
|
if (isKnown) { |
||||||
|
if (mBinding.ilPointX.root.visibility == View.VISIBLE) { |
||||||
|
val x = getX() |
||||||
|
if (TextUtils.isEmpty(x)) { |
||||||
|
val hint = R.string.please_input_x |
||||||
|
// val hint = |
||||||
|
// if (isPlatCood) R.string.please_input_x else R.string.please_input_longitude |
||||||
|
ToastUtils.showShort(hint) |
||||||
|
return |
||||||
|
} |
||||||
|
} |
||||||
|
if (mBinding.ilPointY.root.visibility == View.VISIBLE) { |
||||||
|
val y = getY() |
||||||
|
if (TextUtils.isEmpty(y)) { |
||||||
|
val hint = R.string.please_input_y |
||||||
|
// val hint = |
||||||
|
// if (isPlatCood) R.string.please_input_y else R.string.please_input_latitude |
||||||
|
ToastUtils.showShort(hint) |
||||||
|
return |
||||||
|
} |
||||||
|
} |
||||||
|
val z = getZ() |
||||||
|
if (TextUtils.isEmpty(z)) { |
||||||
|
val hint=R.string.please_enter_elevation |
||||||
|
// val hint = if (isLevelProject()) { |
||||||
|
// R.string.please_enter_elevation |
||||||
|
// } else { |
||||||
|
// if (isPlatCood) R.string.please_input_z else R.string.please_enter_elevation |
||||||
|
// } |
||||||
|
ToastUtils.showShort(hint) |
||||||
|
return |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
if (isNewCreatePoint()) { |
||||||
|
checkSameNamePoint(pointNum) { |
||||||
|
success() |
||||||
|
} |
||||||
|
return |
||||||
|
} |
||||||
|
success() |
||||||
|
} |
||||||
|
|
||||||
|
private fun checkSameNamePoint(pointNum: String, success: () -> Unit) { |
||||||
|
lifecycleScope.launch { |
||||||
|
val pointRecord = withContext(Dispatchers.IO) { |
||||||
|
val pointDataSource = SurveyorDatabaseFactory.instance.getPointDataSource() |
||||||
|
pointDataSource.findByNameSync(pointNum, getProjectId()) |
||||||
|
} |
||||||
|
|
||||||
|
if (pointRecord != null) { |
||||||
|
//点名重复,提示 |
||||||
|
TipsFragment.tipsOnly( |
||||||
|
supportFragmentManager, |
||||||
|
this@CreateEditPointActvity, |
||||||
|
this@CreateEditPointActvity, |
||||||
|
"同一项目下点号不能重复,请修改后重试操作。" |
||||||
|
) |
||||||
|
return@launch |
||||||
|
} |
||||||
|
success() |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设置平面还是大地坐标 |
||||||
|
*/ |
||||||
|
private fun setBaseUi() { |
||||||
|
if (!isNewCreatePoint()) { |
||||||
|
mBinding.tvSaveContinue.visibility = View.GONE |
||||||
|
} |
||||||
|
|
||||||
|
if (isLevelProject()) { |
||||||
|
mBinding.ilPointX.root.visibility = View.GONE |
||||||
|
mBinding.ilPointY.root.visibility = View.GONE |
||||||
|
|
||||||
|
setBaseTitleHint( |
||||||
|
R.string.x_coord, |
||||||
|
R.string.y_coord, |
||||||
|
R.string.elevation, |
||||||
|
R.string.please_input_x, |
||||||
|
R.string.please_input_y, |
||||||
|
R.string.please_enter_elevation |
||||||
|
) |
||||||
|
} else { |
||||||
|
setBaseTitleHint( |
||||||
|
R.string.x_coord, R.string.y_coord, R.string.z_coord, |
||||||
|
R.string.please_input_x, R.string.please_input_y, R.string.please_input_z |
||||||
|
) |
||||||
|
// setBaseTitleHint( |
||||||
|
// R.string.longitude, |
||||||
|
// R.string.latitude, |
||||||
|
// R.string.elevation, |
||||||
|
// R.string.please_input_longitude, |
||||||
|
// R.string.please_input_latitude, |
||||||
|
// R.string.please_enter_elevation |
||||||
|
// ) |
||||||
|
} |
||||||
|
|
||||||
|
setEditData() |
||||||
|
} |
||||||
|
|
||||||
|
private fun setBaseTitleHint( |
||||||
|
@StringRes xCoord: Int, yCoord: Int, zCoord: Int, |
||||||
|
pleaseInputX: Int, pleaseInputY: Int, @StringRes pleaseInputZ: Int |
||||||
|
) { |
||||||
|
mBinding.ilPointX.tvTitle.setText(xCoord) |
||||||
|
mBinding.ilPointY.tvTitle.setText(yCoord) |
||||||
|
mBinding.ilPointZ.tvTitle.setText(zCoord) |
||||||
|
mBinding.ilPointX.editText.setHint(pleaseInputX) |
||||||
|
mBinding.ilPointY.editText.setHint(pleaseInputY) |
||||||
|
mBinding.ilPointZ.editText.setHint(pleaseInputZ) |
||||||
|
} |
||||||
|
|
||||||
|
private fun setEditData() { |
||||||
|
editPoint?.let { |
||||||
|
mBinding.ilPointNum.editText.setText(it.getName()) |
||||||
|
|
||||||
|
setCoordData(it.getX(), it.getY(), it.getZ()) |
||||||
|
// setCoordData(it.getLongitude(), it.getLatitude(), it.getZ()) |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private fun setCoordData(x: Double, y: Double, z: Double) { |
||||||
|
mBinding.ilPointX.editText.setText(x.toString()) |
||||||
|
mBinding.ilPointY.editText.setText(y.toString()) |
||||||
|
mBinding.ilPointZ.editText.setText(z.toString()) |
||||||
|
} |
||||||
|
|
||||||
|
override fun initData() { |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
override fun initToolBar() { |
||||||
|
initIntentData() |
||||||
|
val title = if (editPoint == null) R.string.new_point else R.string.edit_point |
||||||
|
setToolbarTitle(title) |
||||||
|
super.initToolBar() |
||||||
|
} |
||||||
|
|
||||||
|
private fun getProjectId() = intent.getStringExtra(BundleConstants.KEY_PROJECT_ID)!! |
||||||
|
private fun getProjectType() = intent.getStringExtra(BundleConstants.KEY_PROJECT_TYPE)!! |
||||||
|
|
||||||
|
private fun getPointType() = intent.getStringExtra(KEY_POINT_TYPE)!! |
||||||
|
|
||||||
|
private fun getEditPoint() = |
||||||
|
intent.getParcelableExtra<PointRecord>(KEY_EDIT_POINT) |
||||||
|
|
||||||
|
private fun isNewCreatePoint() = editPoint == null |
||||||
|
|
||||||
|
private fun getPointNumber() = mBinding.ilPointNum.editText.text.toString().trim() |
||||||
|
private fun getX() = mBinding.ilPointX.editText.text.toString().trim() |
||||||
|
private fun getY() = mBinding.ilPointY.editText.text.toString().trim() |
||||||
|
private fun getZ() = mBinding.ilPointZ.editText.text.toString().trim() |
||||||
|
|
||||||
|
private fun getXDouble(): Double { |
||||||
|
return xToDouble(getX()) |
||||||
|
} |
||||||
|
|
||||||
|
private fun getYDouble(): Double { |
||||||
|
return xToDouble(getY()) |
||||||
|
} |
||||||
|
|
||||||
|
private fun getZDouble(): Double { |
||||||
|
return xToDouble(getZ()) |
||||||
|
} |
||||||
|
|
||||||
|
private fun xToDouble(value: String): Double { |
||||||
|
return if (TextUtils.isEmpty(value)) { |
||||||
|
0.0 |
||||||
|
} else { |
||||||
|
value.toDouble() |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private fun clearContent() { |
||||||
|
mBinding.ilPointX.editText.setText("") |
||||||
|
mBinding.ilPointY.editText.setText("") |
||||||
|
mBinding.ilPointZ.editText.setText("") |
||||||
|
mBinding.ilPointX.editText.requestFocus() |
||||||
|
} |
||||||
|
|
||||||
|
private fun getNextPointNum(): String { |
||||||
|
val pointNumber = getPointNumber() |
||||||
|
val index = getIndexForTianjin(pointNumber) |
||||||
|
val word = getWordForTianjin(pointNumber) |
||||||
|
return "${word}${index + 1}" |
||||||
|
} |
||||||
|
|
||||||
|
private fun getIndexForTianjin(pointName: String): Int { |
||||||
|
val pre = "\\D*" |
||||||
|
val data = pointName.replace(pre.toRegex(), "") |
||||||
|
return try { |
||||||
|
data.toInt() |
||||||
|
} catch (e: NumberFormatException) { |
||||||
|
0 |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private fun getWordForTianjin(pointName: String): String { |
||||||
|
val pre = "\\d*" |
||||||
|
return pointName.replace(pre.toRegex(), "") |
||||||
|
} |
||||||
|
|
||||||
|
private fun saveRecordForEdit(pointRecord: PointRecord, success: () -> Unit) { |
||||||
|
lifecycleScope.launch(Dispatchers.IO) { |
||||||
|
pointRecord.setX(getXDouble()) |
||||||
|
pointRecord.setY(getYDouble()) |
||||||
|
pointRecord.setZ(getZDouble()) |
||||||
|
pointRecord.setName(getPointNumber()) |
||||||
|
pointRecord.setCode("") |
||||||
|
pointRecord.setRemarks("") |
||||||
|
SurveyorDatabaseFactory.instance |
||||||
|
.getPointDataSource() |
||||||
|
.saveSync(pointRecord) |
||||||
|
success() |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private fun saveRecordForCreate(success: (() -> Unit)? = null) { |
||||||
|
lifecycleScope.launch(Dispatchers.IO) { |
||||||
|
val pointRecord = createPointRecord( |
||||||
|
getProjectId(), getPointType(), getPointNumber(), "", |
||||||
|
getXDouble(), getYDouble(), getZDouble(), "", -1, |
||||||
|
) |
||||||
|
SurveyorDatabaseFactory.instance |
||||||
|
.getPointDataSource() |
||||||
|
.save(pointRecord) |
||||||
|
success?.invoke() |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@WorkerThread |
||||||
|
private fun createPointRecord( |
||||||
|
projectId: String, |
||||||
|
pointType: String, |
||||||
|
name: String, |
||||||
|
code: String, |
||||||
|
x: Double, |
||||||
|
y: Double, |
||||||
|
z: Double, |
||||||
|
remarks: String, |
||||||
|
orderIndex: Int, |
||||||
|
): PointRecord { |
||||||
|
return PointRecord.point( |
||||||
|
projectId, pointType, name, code, |
||||||
|
x, y, z, remarks, |
||||||
|
orderIndex.toLong() |
||||||
|
) |
||||||
|
} |
||||||
|
|
||||||
|
private fun isLevelProject() = ProjectTypeValue.LEVEL == getProjectType() |
||||||
|
|
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
package com.bingce.controlnetwork.newui.viewholder; |
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView; |
||||||
|
|
||||||
|
import com.bingce.controlnetwork.databinding.NewItemPointListBinding; |
||||||
|
|
||||||
|
|
||||||
|
public class PointListViewHolder extends RecyclerView.ViewHolder { |
||||||
|
public final NewItemPointListBinding mBinding; |
||||||
|
|
||||||
|
public PointListViewHolder(NewItemPointListBinding binding) { |
||||||
|
super(binding.getRoot()); |
||||||
|
mBinding = binding; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,86 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
android:orientation="vertical"> |
||||||
|
|
||||||
|
<ScrollView |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="0dp" |
||||||
|
android:layout_weight="1"> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:orientation="vertical" |
||||||
|
android:padding="@dimen/dp_12"> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:background="@drawable/round_white_16" |
||||||
|
android:divider="@drawable/line_horizontal" |
||||||
|
android:orientation="vertical" |
||||||
|
android:paddingStart="24dp" |
||||||
|
android:paddingEnd="18dp" |
||||||
|
android:showDividers="middle"> |
||||||
|
|
||||||
|
<include |
||||||
|
android:id="@+id/ilPointNum" |
||||||
|
layout="@layout/new_item_station_setting" /> |
||||||
|
|
||||||
|
<include |
||||||
|
android:id="@+id/ilPointX" |
||||||
|
layout="@layout/new_item_station_setting" /> |
||||||
|
|
||||||
|
<include |
||||||
|
android:id="@+id/ilPointY" |
||||||
|
layout="@layout/new_item_station_setting" /> |
||||||
|
|
||||||
|
<include |
||||||
|
android:id="@+id/ilPointZ" |
||||||
|
layout="@layout/new_item_station_setting" /> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
|
|
||||||
|
</ScrollView> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:gravity="bottom" |
||||||
|
android:orientation="horizontal" |
||||||
|
android:padding="12dp"> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvSaveContinue" |
||||||
|
android:layout_width="0dp" |
||||||
|
android:layout_height="40dp" |
||||||
|
android:layout_weight="1" |
||||||
|
android:background="@drawable/round_btn_bg_gray_3" |
||||||
|
android:gravity="center" |
||||||
|
android:text="@string/btn_save_and_continue" |
||||||
|
android:textColor="@color/colorPrimary" |
||||||
|
android:textSize="@dimen/edit_text" /> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvSaveQuit" |
||||||
|
android:layout_width="0dp" |
||||||
|
android:layout_height="40dp" |
||||||
|
android:layout_marginStart="15dp" |
||||||
|
android:layout_weight="1" |
||||||
|
android:background="@drawable/round_btn_bg_colormay_3" |
||||||
|
android:gravity="center" |
||||||
|
android:text="@string/btn_save_and_quit" |
||||||
|
android:textColor="@color/white" |
||||||
|
android:textSize="@dimen/edit_text" /> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,34 @@ |
|||||||
|
<?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:background="@color/bg_content_new" |
||||||
|
android:orientation="vertical"> |
||||||
|
|
||||||
|
<include |
||||||
|
layout="@layout/new_item_slide_edit_delete_hint" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_margin="12dp" |
||||||
|
android:visibility="visible" /> |
||||||
|
|
||||||
|
<include |
||||||
|
android:id="@+id/ilSwipeList" |
||||||
|
layout="@layout/new_item_swipe_list" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="0dp" |
||||||
|
android:layout_weight="1" /> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/tvNewPoint" |
||||||
|
style="@style/DefaultButtonStyle" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_gravity="center_vertical" |
||||||
|
android:layout_margin="12dp" |
||||||
|
android:gravity="center" |
||||||
|
android:text="@string/new_point" |
||||||
|
app:backgroundTint="?colorPrimary" /> |
||||||
|
|
||||||
|
</LinearLayout> |
@ -0,0 +1,73 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:background="@color/white" |
||||||
|
android:orientation="vertical" |
||||||
|
android:paddingHorizontal="16dp" |
||||||
|
android:paddingVertical="5dp"> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:orientation="horizontal"> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvPointNum" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="22dp" |
||||||
|
android:gravity="center_vertical" |
||||||
|
android:textColor="@color/black" |
||||||
|
android:textSize="@dimen/control_text_title" |
||||||
|
tools:text="1234" /> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvPointName" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="22dp" |
||||||
|
android:layout_marginStart="25dp" |
||||||
|
android:gravity="center_vertical" |
||||||
|
android:textColor="@color/black" |
||||||
|
android:textSize="@dimen/control_text_title" |
||||||
|
tools:text="马路边" /> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:orientation="horizontal"> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvX" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_marginEnd="20dp" |
||||||
|
android:gravity="center_vertical" |
||||||
|
android:textColor="@color/black_60" |
||||||
|
android:textSize="@dimen/text_size_two" |
||||||
|
tools:text="X" /> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvY" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_marginEnd="20dp" |
||||||
|
android:gravity="center_vertical" |
||||||
|
android:textColor="@color/black_60" |
||||||
|
android:textSize="@dimen/text_size_two" |
||||||
|
tools:text="Y" /> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvZ" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:gravity="center_vertical" |
||||||
|
android:textColor="@color/black_60" |
||||||
|
android:textSize="@dimen/text_size_two" |
||||||
|
tools:text="Z" /> |
||||||
|
|
||||||
|
</LinearLayout> |
||||||
|
|
||||||
|
</LinearLayout> |
@ -0,0 +1,6 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:text="@string/notice_list_left_swipe_edit_delete" |
||||||
|
android:textColor="@color/text_color_desc" /> |
@ -1 +1 @@ |
|||||||
Subproject commit 697c229579216c89f87450553f99e87f4813c60f |
Subproject commit 6d4b6fbdb26fe2e4218f2e17e36bc903f07c78cf |
Loading…
Reference in new issue