@@ -17,6 +17,7 @@ | |||||
tools:targetApi="31"> | tools:targetApi="31"> | ||||
<activity | <activity | ||||
android:name=".view.from.wlgl_activity" | android:name=".view.from.wlgl_activity" | ||||
android:windowSoftInputMode="adjustPan|stateHidden" | |||||
android:exported="false" /> | android:exported="false" /> | ||||
<activity | <activity | ||||
android:name=".view.from.yfpf_activity" | android:name=".view.from.yfpf_activity" | ||||
@@ -7,6 +7,8 @@ import android.util.Log; | |||||
import com.example.bpa.config.ConfigName; | import com.example.bpa.config.ConfigName; | ||||
import com.example.bpa.db.QueryDB; | import com.example.bpa.db.QueryDB; | ||||
import com.example.bpa.db.mode.BPA_MATERIAL; | import com.example.bpa.db.mode.BPA_MATERIAL; | ||||
import com.example.bpa.db.mode.BPA_SILOS; | |||||
import com.example.bpa.db.mode.BPA_SILOSANDMATERIAL; | |||||
import com.example.bpa.db.mode.BPA_USER; | import com.example.bpa.db.mode.BPA_USER; | ||||
import com.example.bpa.helper.Json; | import com.example.bpa.helper.Json; | ||||
import com.example.bpa.helper.SdCart; | import com.example.bpa.helper.SdCart; | ||||
@@ -50,9 +52,33 @@ public class ICSApp extends Application { | |||||
user.userID="20230415-fyf"; | user.userID="20230415-fyf"; | ||||
user.exp="管理员"; | user.exp="管理员"; | ||||
QueryDB.AddUser(user); | QueryDB.AddUser(user); | ||||
} | } | ||||
} | } | ||||
public void AddTestLC() | |||||
{ | |||||
BPA_SILOS par=new BPA_SILOS(); | |||||
par.id="1231333"; | |||||
par.num=1; | |||||
par.name="料仓"; | |||||
par.warningValue=49; | |||||
par.thrsoleValue=20; | |||||
par.plcValue="232"; | |||||
par.bValue=30; | |||||
par.jValue=23; | |||||
par.status=1; | |||||
par.Sort=0; | |||||
QueryDB.AddSilos(par); | |||||
//2.获取物料 | |||||
ArrayList<BPA_MATERIAL> materials= QueryDB.GetMaterialALL(); | |||||
BPA_SILOSANDMATERIAL al=new BPA_SILOSANDMATERIAL(); | |||||
al.silosID="1231333"; | |||||
al.materialID=materials.get(0).id; | |||||
QueryDB.AddSilosAndMaterial(al); | |||||
} | |||||
/** | /** | ||||
* 测试数据库 新增 修改 删除 | * 测试数据库 新增 修改 删除 | ||||
*/ | */ | ||||
@@ -23,6 +23,7 @@ import com.example.bpa.db.mode.BPA_SYSTEMSET; | |||||
import com.example.bpa.db.mode.BPA_USER; | import com.example.bpa.db.mode.BPA_USER; | ||||
import com.example.bpa.db.mode.ModeBase; | import com.example.bpa.db.mode.ModeBase; | ||||
import com.example.bpa.helper.Tools; | import com.example.bpa.helper.Tools; | ||||
import com.example.bpa.view.mode.ResSilosMode; | |||||
import java.lang.reflect.Field; | import java.lang.reflect.Field; | ||||
import java.text.SimpleDateFormat; | import java.text.SimpleDateFormat; | ||||
@@ -122,6 +123,26 @@ public class QueryDB { | |||||
} | } | ||||
return data.size()>0; | return data.size()>0; | ||||
} | } | ||||
/** | |||||
* 物料ID查询物料信息 | |||||
* @param id | |||||
* @return | |||||
*/ | |||||
public static BPA_MATERIAL GetMaterialID(String id) | |||||
{ | |||||
BPA_MATERIAL bpa_material=null; | |||||
boolean isSucess=false; | |||||
String orderby=Desc_Time_Up;//出料顺序 | |||||
String where="isDelete=? and id=?"; | |||||
String[] args=new String[] { "0" ,id}; | |||||
ArrayList<BPA_MATERIAL> data=new ArrayList<>(); | |||||
ArrayList<Object> obj=Get(BPA_MATERIAL.class,where,args,orderby); | |||||
for (Object k:obj) { | |||||
bpa_material=(BPA_MATERIAL)k; | |||||
} | |||||
return bpa_material; | |||||
} | |||||
//endregion | //endregion | ||||
//region BPA_SILOS 料仓管理表 | //region BPA_SILOS 料仓管理表 | ||||
@@ -170,6 +191,98 @@ public class QueryDB { | |||||
} | } | ||||
return data; | return data; | ||||
} | } | ||||
/** | |||||
* 获取料仓数据 | |||||
* @return | |||||
*/ | |||||
public static ArrayList<ResSilosMode> GetSilos() | |||||
{ | |||||
ArrayList<ResSilosMode> data=new ArrayList<>(); | |||||
//1.获取料仓数据 | |||||
ArrayList<BPA_SILOS> silos=GetSilosALL(); | |||||
//2.获取物料 | |||||
ArrayList<BPA_MATERIAL> materials= GetMaterialALL(); | |||||
//3.获取返回数据 | |||||
for (BPA_SILOS k:silos) { | |||||
ResSilosMode par=new ResSilosMode(); | |||||
par.id=k.id; | |||||
par.createTime=k.createTime; | |||||
par.updateTime=k.updateTime; | |||||
par.deleteTime=k.deleteTime; | |||||
par.deviceID=k.deviceID; | |||||
par.userID=k.userID; | |||||
par.isDelete=k.isDelete; | |||||
par.exp=k.exp; | |||||
par.num=k.num; | |||||
par.name=k.name; | |||||
par.warningValue=k.warningValue; | |||||
par.thrsoleValue=k.thrsoleValue; | |||||
par.plcValue=k.plcValue; | |||||
par.bValue=k.bValue; | |||||
par.jValue=k.jValue; | |||||
par.status=k.status; | |||||
par.Sort=k.Sort; | |||||
ArrayList<String> gx= GetMaterialList(k.id); | |||||
if(!gx.isEmpty() && gx.size()>0) | |||||
{ | |||||
String wlid= gx.get(0); | |||||
if(!wlid.isEmpty()) | |||||
{ | |||||
BPA_MATERIAL wl=null; | |||||
for (BPA_MATERIAL m:materials) { | |||||
if(m.id.equals(wlid)) | |||||
{ | |||||
wl=m; | |||||
break; | |||||
} | |||||
} | |||||
if(wl!=null) | |||||
{ | |||||
par.materialID=wl.id; | |||||
par.materialimgUrl=wl.imgUrl; | |||||
par.materialname=wl.name; | |||||
} | |||||
} | |||||
} | |||||
par.dvalue=0; | |||||
data.add(par); | |||||
} | |||||
return data; | |||||
} | |||||
/** | |||||
* 根据ID查询料仓管理 | |||||
* @return | |||||
*/ | |||||
public static BPA_SILOS GetSilosID(String id) | |||||
{ | |||||
BPA_SILOS data=null; | |||||
String orderby=Desc_Sort_Up+','+Desc_Time_Up;//先按排序 创建时间倒序 | |||||
String where="isDelete=? and id=?"; | |||||
String[] args=new String[] { "0",id }; | |||||
ArrayList<Object> obj=Get(BPA_SILOS.class,where,args,orderby); | |||||
for (Object k:obj) { | |||||
data=(BPA_SILOS)k; | |||||
} | |||||
return data; | |||||
} | |||||
/** | |||||
* 修改校准值 | |||||
* @param id | |||||
* @param data | |||||
*/ | |||||
public static void UpdateJYZ(String id, int data) | |||||
{ | |||||
BPA_SILOS silos= GetSilosID(id); | |||||
if(silos!=null) | |||||
{ | |||||
silos.jValue=data; | |||||
Update(BPA_SILOS.class,silos); | |||||
} | |||||
} | |||||
//endregion | //endregion | ||||
//region BPA_SILOSANDMATERIAL 料仓物料关联表 | //region BPA_SILOSANDMATERIAL 料仓物料关联表 | ||||
@@ -993,25 +1106,28 @@ public class QueryDB { | |||||
if (id.isEmpty()) | if (id.isEmpty()) | ||||
return false; | return false; | ||||
for (String key : map.keySet()) { | for (String key : map.keySet()) { | ||||
Object value = map.get(key); | |||||
if(value instanceof String) | |||||
if(!key.equals("id")) | |||||
{ | { | ||||
cv.put(key, (String) value); | |||||
}else if (value instanceof Integer) | |||||
{ | |||||
cv.put(key, ((Integer) value).intValue()); | |||||
}else if (value instanceof Double) | |||||
{ | |||||
cv.put(key, ((Double) value).doubleValue()); | |||||
}else if (value instanceof Float) | |||||
{ | |||||
cv.put(key, ((Float) value).floatValue()); | |||||
}else if (value instanceof Long) | |||||
{ | |||||
cv.put(key, ((Long) value).longValue()); | |||||
}else if (value instanceof Boolean) | |||||
{ | |||||
cv.put(key, ((Boolean) value).booleanValue()); | |||||
Object value = map.get(key); | |||||
if(value instanceof String) | |||||
{ | |||||
cv.put(key, (String) value); | |||||
}else if (value instanceof Integer) | |||||
{ | |||||
cv.put(key, ((Integer) value).intValue()); | |||||
}else if (value instanceof Double) | |||||
{ | |||||
cv.put(key, ((Double) value).doubleValue()); | |||||
}else if (value instanceof Float) | |||||
{ | |||||
cv.put(key, ((Float) value).floatValue()); | |||||
}else if (value instanceof Long) | |||||
{ | |||||
cv.put(key, ((Long) value).longValue()); | |||||
}else if (value instanceof Boolean) | |||||
{ | |||||
cv.put(key, ((Boolean) value).booleanValue()); | |||||
} | |||||
} | } | ||||
// else if (value instanceof Date) | // else if (value instanceof Date) | ||||
// { | // { | ||||
@@ -1019,7 +1135,6 @@ public class QueryDB { | |||||
// } | // } | ||||
} | } | ||||
SQLiteDatabase db = helper.getWritableDatabase(); | SQLiteDatabase db = helper.getWritableDatabase(); | ||||
long insert = db.insert(c.getSimpleName(), null, cv); | |||||
db.update(c.getSimpleName(),cv,"id = ?", new String[] { id }); | db.update(c.getSimpleName(),cv,"id = ?", new String[] { id }); | ||||
db.close(); | db.close(); | ||||
return true; | return true; | ||||
@@ -0,0 +1,69 @@ | |||||
package com.example.bpa.view.adapter; | |||||
import android.content.Context; | |||||
import android.view.LayoutInflater; | |||||
import android.view.View; | |||||
import android.view.ViewGroup; | |||||
import android.widget.ArrayAdapter; | |||||
import android.widget.Button; | |||||
import android.widget.TextView; | |||||
import androidx.annotation.NonNull; | |||||
import androidx.annotation.Nullable; | |||||
import com.example.bpa.R; | |||||
import com.example.bpa.db.mode.BPA_MATERIAL; | |||||
import com.example.bpa.helper.T; | |||||
import com.example.bpa.view.inteface.MyClickListener; | |||||
import com.example.bpa.view.mode.ResSilosMode; | |||||
import java.util.List; | |||||
/** | |||||
* 流速校验DataTab | |||||
*/ | |||||
public class lsjy_adapter extends ArrayAdapter<ResSilosMode> { | |||||
/** | |||||
* 内部点击事件 | |||||
*/ | |||||
private MyClickListener mListener; | |||||
private List<ResSilosMode> datas; | |||||
public lsjy_adapter(@NonNull Context context, int resource, @NonNull List<ResSilosMode> objects, MyClickListener listener) { | |||||
super(context, resource, objects); | |||||
mListener = listener; | |||||
datas=objects; | |||||
} | |||||
//每个子项被滚动到屏幕内的时候会被调用 | |||||
@NonNull | |||||
@Override | |||||
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { | |||||
ResSilosMode resSilosMode = (ResSilosMode) getItem(position);//得到当前项选中item实例 | |||||
//为每一个子项加载设定的布局 | |||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.lsjy_item, parent, false); | |||||
//分别获取 image view 和 textview 的实例 | |||||
TextView name = view.findViewById(R.id.name); | |||||
TextView lc_num = view.findViewById(R.id.lc_num); | |||||
TextView lc_bzls = view.findViewById(R.id.lc_bzls); | |||||
TextView lc_xyls = view.findViewById(R.id.lc_xyls); | |||||
Button button = view.findViewById(R.id.button_item); | |||||
// 设置要显示的图片和文字 | |||||
name.setText(resSilosMode.materialname); | |||||
lc_num.setText(""+resSilosMode.num); | |||||
lc_bzls.setText(""+resSilosMode.bValue); | |||||
lc_xyls.setText(""+resSilosMode.jValue); | |||||
button.setOnClickListener(new View.OnClickListener() { | |||||
@Override | |||||
public void onClick(View view) { | |||||
try | |||||
{ | |||||
mListener.clickListener(view,resSilosMode); | |||||
} catch (Exception e) | |||||
{ | |||||
T.show(view.getContext(),"校验流速出错:"+e.getMessage()); | |||||
} | |||||
} | |||||
}); | |||||
return view; | |||||
} | |||||
} |
@@ -1,13 +1,24 @@ | |||||
package com.example.bpa.view.from; | package com.example.bpa.view.from; | ||||
import androidx.appcompat.app.AppCompatActivity; | import androidx.appcompat.app.AppCompatActivity; | ||||
import androidx.recyclerview.widget.RecyclerView; | |||||
import android.content.Intent; | |||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.view.View; | import android.view.View; | ||||
import android.widget.ImageView; | import android.widget.ImageView; | ||||
import android.widget.TextView; | import android.widget.TextView; | ||||
import com.example.bpa.R; | import com.example.bpa.R; | ||||
import com.example.bpa.helper.T; | |||||
import com.example.bpa.view.control.ItemClickListener; | |||||
import com.example.bpa.view.control.MainMeunAdapter; | |||||
import com.example.bpa.view.control.MyLayoutManager; | |||||
import com.example.bpa.view.mode.MenuMode; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
/** | /** | ||||
* 电子秤校验 | * 电子秤校验 | ||||
*/ | */ | ||||
@@ -21,6 +32,9 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis | |||||
* 标题设置 | * 标题设置 | ||||
*/ | */ | ||||
TextView gongneng_title; | TextView gongneng_title; | ||||
RecyclerView recyclerView; | |||||
MainMeunAdapter adapter; | |||||
List<MenuMode> menuModes = new ArrayList<>(); | |||||
//endregion | //endregion | ||||
//region 私有函数 | //region 私有函数 | ||||
@@ -45,7 +59,46 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis | |||||
String msg=getIntent().getStringExtra("data"); | String msg=getIntent().getStringExtra("data"); | ||||
gongneng_title.setText(msg); | gongneng_title.setText(msg); | ||||
((TextView)this.findViewById(R.id.test_view)).setText(msg); | |||||
recyclerView = this.findViewById(R.id.recycler_view); | |||||
menuModes.clear(); | |||||
menuModes.add(new MenuMode("设置最大称重",R.mipmap.zuidachengzhong)); | |||||
menuModes.add(new MenuMode("设置分度参数",R.mipmap.shezhifenducanshu)); | |||||
menuModes.add(new MenuMode("归零",R.mipmap.guiling)); | |||||
menuModes.add(new MenuMode("设置标准重量",R.mipmap.biaozhunzhongliang)); | |||||
menuModes.add(new MenuMode("称重校验",R.mipmap.chengzhongjiaoyan)); | |||||
MyLayoutManager layout = new MyLayoutManager(); | |||||
//必须,防止recyclerview高度为wrap时测量item高度0 | |||||
layout.setAutoMeasureEnabled(true); | |||||
recyclerView.setLayoutManager(layout); | |||||
adapter = new MainMeunAdapter(this, menuModes); | |||||
recyclerView.setAdapter(adapter); | |||||
recyclerView.addOnItemTouchListener(new ItemClickListener(recyclerView, new ItemClickListener.OnItemClickListener() { | |||||
@Override | |||||
public void onItemClick(View view, int position) { | |||||
TextView textView = (TextView) view.findViewById(R.id.meun_textview); | |||||
T.show(view.getContext(),"打开窗体:"+ textView.getText().toString()); | |||||
switch (textView.getText().toString()) | |||||
{ | |||||
case "设置最大称重": | |||||
break; | |||||
case "设置分度参数": | |||||
break; | |||||
case "归零": | |||||
break; | |||||
case "设置标准重量": | |||||
break; | |||||
case "称重校验": | |||||
default: | |||||
break; | |||||
} | |||||
} | |||||
@Override | |||||
public void onItemLongClick(View view, int position) { | |||||
} | |||||
})); | |||||
} | } | ||||
/** | /** | ||||
@@ -4,14 +4,25 @@ import androidx.appcompat.app.AppCompatActivity; | |||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.view.View; | import android.view.View; | ||||
import android.widget.ImageView; | import android.widget.ImageView; | ||||
import android.widget.ListView; | |||||
import android.widget.TextView; | import android.widget.TextView; | ||||
import com.example.bpa.R; | import com.example.bpa.R; | ||||
import com.example.bpa.db.QueryDB; | |||||
import com.example.bpa.db.mode.BPA_MATERIAL; | |||||
import com.example.bpa.db.mode.BPA_SILOS; | |||||
import com.example.bpa.helper.T; | |||||
import com.example.bpa.view.adapter.lsjy_adapter; | |||||
import com.example.bpa.view.adapter.wl_adapter; | |||||
import com.example.bpa.view.inteface.MyClickListener; | |||||
import com.example.bpa.view.mode.ResSilosMode; | |||||
import java.util.ArrayList; | |||||
/** | /** | ||||
* 流速校验 | * 流速校验 | ||||
*/ | */ | ||||
public class lsjy_activity extends AppCompatActivity implements View.OnClickListener{ | |||||
public class lsjy_activity extends AppCompatActivity implements View.OnClickListener, MyClickListener { | |||||
//region 变量 | //region 变量 | ||||
/** | /** | ||||
* 返回按钮 | * 返回按钮 | ||||
@@ -21,6 +32,14 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList | |||||
* 标题设置 | * 标题设置 | ||||
*/ | */ | ||||
TextView gongneng_title; | TextView gongneng_title; | ||||
/** | |||||
* 表格显示 | |||||
*/ | |||||
ListView datatab; | |||||
/** | |||||
* 料仓数据 | |||||
*/ | |||||
ArrayList<ResSilosMode> resSilosModes=new ArrayList<>(); | |||||
//endregion | //endregion | ||||
//region 私有函数 | //region 私有函数 | ||||
@@ -41,11 +60,11 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList | |||||
private void Init(){ | private void Init(){ | ||||
gongneng_fanhui = this.findViewById(R.id.gongneng_fanhui); | gongneng_fanhui = this.findViewById(R.id.gongneng_fanhui); | ||||
gongneng_title = this.findViewById(R.id.gongneng_title); | gongneng_title = this.findViewById(R.id.gongneng_title); | ||||
datatab= this.findViewById(R.id.datatab); | |||||
//通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据 | //通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据 | ||||
String msg=getIntent().getStringExtra("data"); | String msg=getIntent().getStringExtra("data"); | ||||
gongneng_title.setText(msg); | gongneng_title.setText(msg); | ||||
((TextView)this.findViewById(R.id.test_view)).setText(msg); | |||||
Initdata(); | |||||
} | } | ||||
/** | /** | ||||
@@ -54,6 +73,20 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList | |||||
private void initEvents() { | private void initEvents() { | ||||
gongneng_fanhui.setOnClickListener(this); | gongneng_fanhui.setOnClickListener(this); | ||||
} | } | ||||
/** | |||||
* 初始化数据加载 | |||||
*/ | |||||
public void Initdata() | |||||
{ | |||||
try{ | |||||
resSilosModes= QueryDB.GetSilos(); | |||||
lsjy_adapter adapter = new lsjy_adapter(lsjy_activity.this, R.layout.lsjy_item, resSilosModes,this); | |||||
datatab.setAdapter(adapter); | |||||
}catch(Exception e){ | |||||
} | |||||
} | |||||
//endregion | //endregion | ||||
//region 点击事件 | //region 点击事件 | ||||
@@ -70,5 +103,21 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList | |||||
break; | break; | ||||
} | } | ||||
} | } | ||||
int k=404; | |||||
/** | |||||
* 接口方法,响应ListView按钮点击事件 | |||||
*/ | |||||
@Override | |||||
public void clickListener(View v,Object data) { | |||||
switch (v.getId()) | |||||
{ | |||||
case R.id.button_item://校验 | |||||
k=k+1; | |||||
T.show(this,((ResSilosMode)data).id); | |||||
QueryDB.UpdateJYZ(((ResSilosMode)data).id,k); | |||||
Initdata(); | |||||
break; | |||||
} | |||||
} | |||||
//endregion | //endregion | ||||
} | } |
@@ -35,8 +35,10 @@ public class wlgl_activity extends AppCompatActivity implements View.OnClickList | |||||
* 标题设置 | * 标题设置 | ||||
*/ | */ | ||||
TextView gongneng_title; | TextView gongneng_title; | ||||
//edittext buttonadd ListView datatab | |||||
//endregion | //endregion | ||||
//region 操作变量 | |||||
/** | /** | ||||
* 输入框 | * 输入框 | ||||
*/ | */ | ||||
@@ -53,8 +55,6 @@ public class wlgl_activity extends AppCompatActivity implements View.OnClickList | |||||
* 物料数据 | * 物料数据 | ||||
*/ | */ | ||||
ArrayList<BPA_MATERIAL> bpa_materials=new ArrayList<>(); | ArrayList<BPA_MATERIAL> bpa_materials=new ArrayList<>(); | ||||
//region 操作变量 | |||||
//endregion | //endregion | ||||
//region 私有函数 | //region 私有函数 | ||||
@@ -0,0 +1,14 @@ | |||||
package com.example.bpa.view.mode; | |||||
import com.example.bpa.db.mode.BPA_SILOS; | |||||
public class ResSilosMode extends BPA_SILOS { | |||||
//物料ID | |||||
public String materialID; | |||||
//物料图片路径 | |||||
public String materialimgUrl; | |||||
//物料名称 | |||||
public String materialname; | |||||
//当前余量 | |||||
public int dvalue; | |||||
} |
@@ -0,0 +1,97 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<RelativeLayout | |||||
xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:orientation="horizontal"> | |||||
<TableLayout | |||||
android:background="@mipmap/bgxz" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:gravity="center" | |||||
android:layout_gravity="center" | |||||
android:stretchColumns="0"> | |||||
<TableRow | |||||
android:layout_width="fill_parent" | |||||
android:layout_height="wrap_content" | |||||
android:gravity="center_horizontal"> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:id="@+id/name" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_centerVertical="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="回锅肉" | |||||
android:textColor="@color/foreground" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:id="@+id/lc_num" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_centerVertical="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="1" | |||||
android:textColor="@color/foreground" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:id="@+id/lc_bzls" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_centerVertical="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="1" | |||||
android:textColor="@color/foreground" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:id="@+id/lc_xyls" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_centerVertical="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="1" | |||||
android:textColor="@color/foreground" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1"> | |||||
<Button | |||||
android:id="@+id/button_item" | |||||
android:text="开始校验" | |||||
android:background="@drawable/btn_button" | |||||
android:textSize="@dimen/textSize" | |||||
android:textColor="@color/foreground" | |||||
android:layout_centerVertical="true" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_width="60dp" | |||||
android:layout_height="26dp" | |||||
/> | |||||
</RelativeLayout> | |||||
</TableRow> | |||||
</TableLayout> | |||||
</RelativeLayout> |
@@ -79,13 +79,10 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="10dp"> | android:layout_margin="10dp"> | ||||
<TextView | |||||
android:id="@+id/test_view" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/foreground" | |||||
android:textSize="@dimen/TitleSize"> | |||||
</TextView> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recycler_view" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content"/> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
</LinearLayout> | </LinearLayout> |
@@ -80,13 +80,127 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="10dp"> | android:layout_margin="10dp"> | ||||
<TextView | |||||
android:id="@+id/test_view" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/foreground" | |||||
android:textSize="@dimen/TitleSize"> | |||||
</TextView> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:orientation="vertical"> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent"> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:layout_marginTop="10dp" | |||||
android:orientation="vertical"> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:background="@mipmap/bgbtbj" | |||||
android:layout_height="26dp"> | |||||
<View | |||||
android:layout_width="match_parent" | |||||
android:layout_height="1dp" | |||||
android:background="#FF03668F" /> | |||||
<View | |||||
android:layout_width="match_parent" | |||||
android:layout_height="1dp" | |||||
android:layout_alignParentBottom="true" | |||||
android:background="#FF03668F" /> | |||||
<TableLayout | |||||
android:layout_centerVertical="true" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:gravity="center" | |||||
android:layout_gravity="center" | |||||
android:stretchColumns="0"> | |||||
<TableRow | |||||
android:layout_width="fill_parent" | |||||
android:layout_height="wrap_content" | |||||
android:gravity="center_horizontal"> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="饮料名称" | |||||
android:textColor="@color/dataGridColumnHeaderColor" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="料仓编号" | |||||
android:textColor="@color/dataGridColumnHeaderColor" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="标准出料值" | |||||
android:textColor="@color/dataGridColumnHeaderColor" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="校准出料值" | |||||
android:textColor="@color/dataGridColumnHeaderColor" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1"> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_marginLeft="20dp" | |||||
android:layout_alignParentLeft="true" | |||||
android:text="用户操作" | |||||
android:textColor="@color/dataGridColumnHeaderColor" | |||||
android:textSize="@dimen/textSize" /> | |||||
</RelativeLayout> | |||||
</TableRow> | |||||
</TableLayout> | |||||
</RelativeLayout> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent"> | |||||
<ListView | |||||
android:id="@+id/datatab" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent" | |||||
android:divider="#00000000" | |||||
android:dividerHeight="3dp" | |||||
android:layout_marginTop="3dp" | |||||
/> | |||||
</RelativeLayout> | |||||
</LinearLayout> | |||||
</RelativeLayout> | |||||
</LinearLayout> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
</LinearLayout> | </LinearLayout> |