Compare commits
10 Commits
36c055af41
...
088fc98ae2
| Author | SHA1 | Date |
|---|---|---|
|
|
088fc98ae2 | 3 months ago |
|
|
0b10f8d292 | 4 months ago |
|
|
feff7ae958 | 4 months ago |
|
|
d2356b2c57 | 5 months ago |
|
|
84354e9d77 | 5 months ago |
|
|
2c800dc700 | 5 months ago |
|
|
414d83c4c9 | 7 months ago |
|
|
082b853125 | 7 months ago |
|
|
dafb154022 | 7 months ago |
|
|
d2818be8d2 | 8 months ago |
Binary file not shown.
@ -0,0 +1,46 @@
|
|||||||
|
package com.rehome.dywoa.adapter
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.rehome.dywoa.base.BaseViewBindingAdapter
|
||||||
|
import com.rehome.dywoa.bean.SisBaseBean
|
||||||
|
import com.rehome.dywoa.bean.XjZhTjBean
|
||||||
|
import com.rehome.dywoa.databinding.AdapterSisRealDataBinding
|
||||||
|
|
||||||
|
class SisRealDataAdapter(var context: Context,
|
||||||
|
var data: MutableList<SisBaseBean>) : BaseViewBindingAdapter<AdapterSisRealDataBinding>(context) {
|
||||||
|
override fun getCount(): Int {
|
||||||
|
return data.count()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItem(position: Int): Any {
|
||||||
|
return data[position]
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemId(position: Int): Long {
|
||||||
|
return position.toLong()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getBinding(
|
||||||
|
inflater: LayoutInflater,
|
||||||
|
parent: ViewGroup?
|
||||||
|
) = AdapterSisRealDataBinding.inflate(inflater, parent, false)
|
||||||
|
|
||||||
|
override fun handleData(position: Int, binding: AdapterSisRealDataBinding) {
|
||||||
|
val item: SisBaseBean = data[position]
|
||||||
|
binding.tvSisBh.text = item.sisno
|
||||||
|
|
||||||
|
binding.tvSisMc.text = item.sisDesc
|
||||||
|
if(TextUtils.isEmpty(item.dw)){
|
||||||
|
binding.tvSisRealValue.text = item.sisValue
|
||||||
|
}else{
|
||||||
|
binding.tvSisRealValue.text = buildString {
|
||||||
|
append(item.sisValue)
|
||||||
|
append(item.dw)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package com.rehome.dywoa.bean;
|
||||||
|
|
||||||
|
public class SisBaseBean {
|
||||||
|
private String sisno;
|
||||||
|
private String sisDesc;
|
||||||
|
private String sisValue;
|
||||||
|
private String dw;
|
||||||
|
|
||||||
|
public String getSisno() {
|
||||||
|
return sisno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSisno(String sisno) {
|
||||||
|
this.sisno = sisno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSisDesc() {
|
||||||
|
return sisDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSisDesc(String sisDesc) {
|
||||||
|
this.sisDesc = sisDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSisValue() {
|
||||||
|
return sisValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSisValue(String sisValue) {
|
||||||
|
this.sisValue = sisValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDw() {
|
||||||
|
return dw;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDw(String dw) {
|
||||||
|
this.dw = dw;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
<?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:id="@+id/ll"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#ffffff"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/dagerListMarginTopStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/dagerDetailLeftStyleFirst"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="SIS编号:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sis_bh"
|
||||||
|
style="@style/dagerDetailRightStyleFirst"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/dagerListMarginTopStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/dagerDetailLeftStyleFirst"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="SIS名称:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sis_mc"
|
||||||
|
style="@style/dagerDetailRightStyleFirst"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
style="@style/dagerListMarginTopStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/dagerDetailLeftStyleFirst"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:text="SIS实时数据:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_sis_real_value"
|
||||||
|
style="@style/dagerDetailRightStyleFirst"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@ -1,6 +1,7 @@
|
|||||||
#Thu Jan 16 17:33:21 CST 2025
|
#Thu Jan 16 17:33:21 CST 2025
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
#distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||||
@ -1,10 +1,10 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk 35
|
compileSdk 36
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 24
|
minSdk 24
|
||||||
targetSdk 35
|
targetSdk 36
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
namespace 'org.litepal'
|
namespace 'org.litepal'
|
||||||
|
|||||||
Loading…
Reference in New Issue