desc:标定区分零点标定\跨度点标定
parent
dd554499a5
commit
f1e616bb4b
@ -0,0 +1,35 @@
|
||||
package com.yinuo.safetywatcher.watcher.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.view.View
|
||||
import com.yinuo.safetywatcher.databinding.ActivitySensorCalibrationListBinding
|
||||
import com.yinuo.safetywatcher.watcher.base.NoOptionsActivity
|
||||
|
||||
class SensorCalibrationListActivity : NoOptionsActivity() {
|
||||
private val mBinding by lazy {
|
||||
ActivitySensorCalibrationListBinding.inflate(layoutInflater)
|
||||
}
|
||||
|
||||
override fun generateContentView(): View {
|
||||
return mBinding.root
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
val sensorIndex = intent.getIntExtra("index", -1)
|
||||
val gasName = intent.getStringExtra("GasType")!!
|
||||
mBinding.apply {
|
||||
val intent =
|
||||
Intent(this@SensorCalibrationListActivity, SensorCalibrationActivity::class.java)
|
||||
intent.putExtra("index", sensorIndex)
|
||||
intent.putExtra("GasType", gasName)
|
||||
itemZero.setOnClickListener {
|
||||
intent.putExtra("isZero", true)
|
||||
startActivity(intent)
|
||||
}
|
||||
itemSpan.setOnClickListener {
|
||||
intent.putExtra("isZero", false)
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
<?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">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/item_zero"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_108dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/_121dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/_21dp"
|
||||
android:text="@string/calibration_zero"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_36dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/item_span"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/_108dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/_121dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/_21dp"
|
||||
android:text="@string/calibration_span"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/_36dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue