desc:升级替换一些库
parent
4b8ee71b6e
commit
01e113ca09
@ -0,0 +1,42 @@
|
|||||||
|
package com.yinuo.safetywatcher.watcher.ui
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.view.View
|
||||||
|
import com.yinuo.safetywatcher.R
|
||||||
|
import com.yinuo.safetywatcher.databinding.ActivityChooseParamsBinding
|
||||||
|
import com.yinuo.safetywatcher.watcher.base.NoOptionsActivity
|
||||||
|
|
||||||
|
class ChooseParamsActivity : NoOptionsActivity() {
|
||||||
|
private val mBinding by lazy {
|
||||||
|
ActivityChooseParamsBinding.inflate(layoutInflater)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val START_TIME = "startTime"
|
||||||
|
private const val END_TIME = "endTime"
|
||||||
|
private const val TIME_STEP = "step"
|
||||||
|
private const val WARN_TYPE = "warnType"
|
||||||
|
|
||||||
|
fun open(context: Context, startTime: Long, endTime: Long, timeStep: Int, warnType: String? = null) {
|
||||||
|
val intent = Intent()
|
||||||
|
intent.putExtra(START_TIME, startTime)
|
||||||
|
intent.putExtra(END_TIME, endTime)
|
||||||
|
intent.putExtra(TIME_STEP, timeStep)
|
||||||
|
warnType?.let {
|
||||||
|
intent.putExtra(WARN_TYPE, warnType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getTopBarTitle(): String? {
|
||||||
|
return getString(R.string.modify_params)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun generateContentView(): View {
|
||||||
|
return mBinding.root
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
<?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:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="@dimen/_960dp"
|
||||||
|
android:layout_height="@dimen/_580dp"
|
||||||
|
android:layout_marginTop="@dimen/_201dp"
|
||||||
|
android:background="@drawable/warn_setting_btn_bg">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/divider"
|
||||||
|
android:layout_width="@dimen/_6dp"
|
||||||
|
android:layout_height="@dimen/_28dp"
|
||||||
|
android:layout_marginStart="@dimen/_40dp"
|
||||||
|
android:background="@drawable/white_rectangle"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_cancel"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_currentTime"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/_6dp"
|
||||||
|
android:text="@string/current_time"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_30dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_cancel"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/divider"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/_6dp"
|
||||||
|
android:text="2023.5.31"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_30dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_currentTime"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_currentTime" />
|
||||||
|
|
||||||
|
|
||||||
|
<com.loper7.date_time_picker.DateTimePicker
|
||||||
|
android:id="@+id/picker"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:paddingHorizontal="@dimen/_40dp"
|
||||||
|
android:paddingVertical="@dimen/_66dp"
|
||||||
|
android:background="@drawable/datepicker_bg"
|
||||||
|
android:layout_marginEnd="@dimen/_40dp"
|
||||||
|
app:dt_dividerColor="#00000000"
|
||||||
|
app:dt_layout="@layout/layout_date_picker_globalization1"
|
||||||
|
app:dt_normalTextSize="@dimen/_28dp"
|
||||||
|
app:dt_selectTextSize="@dimen/_30dp"
|
||||||
|
app:dt_selectedTextBold="true"
|
||||||
|
app:dt_showLabel="true"
|
||||||
|
app:dt_textBold="true"
|
||||||
|
app:dt_textColor="@color/color_offline"
|
||||||
|
app:dt_themeColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_confirm"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_cancel"
|
||||||
|
android:layout_width="@dimen/_480dp"
|
||||||
|
android:layout_height="@dimen/_81dp"
|
||||||
|
android:background="@drawable/cancel_btn_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/cancel"
|
||||||
|
android:textColor="@color/white_30"
|
||||||
|
android:textSize="@dimen/_36dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_confirm"
|
||||||
|
android:layout_width="@dimen/_480dp"
|
||||||
|
android:layout_height="@dimen/_81dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:background="@drawable/confirm_btn_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/confirm"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/_36dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string-array name="excel_column">
|
||||||
|
<item>时间</item>
|
||||||
|
<item>属性</item>
|
||||||
|
<item>值</item>
|
||||||
|
<item>单位</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="sensor_types">
|
||||||
|
<item>催化燃烧</item>
|
||||||
|
<item>电化学传感器</item>
|
||||||
|
<item>红外测量</item>
|
||||||
|
<item>PID光离子</item>
|
||||||
|
</string-array>
|
||||||
|
</resources>
|
Loading…
Reference in New Issue