@@ -1,329 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project version="4"> | |||
<component name="direct_access_persist.xml"> | |||
<option name="deviceSelectionList"> | |||
<list> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="27" /> | |||
<option name="brand" value="DOCOMO" /> | |||
<option name="codename" value="F01L" /> | |||
<option name="id" value="F01L" /> | |||
<option name="manufacturer" value="FUJITSU" /> | |||
<option name="name" value="F-01L" /> | |||
<option name="screenDensity" value="360" /> | |||
<option name="screenX" value="720" /> | |||
<option name="screenY" value="1280" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="28" /> | |||
<option name="brand" value="DOCOMO" /> | |||
<option name="codename" value="SH-01L" /> | |||
<option name="id" value="SH-01L" /> | |||
<option name="manufacturer" value="SHARP" /> | |||
<option name="name" value="AQUOS sense2 SH-01L" /> | |||
<option name="screenDensity" value="480" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2160" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="Lenovo" /> | |||
<option name="codename" value="TB370FU" /> | |||
<option name="id" value="TB370FU" /> | |||
<option name="manufacturer" value="Lenovo" /> | |||
<option name="name" value="Tab P12" /> | |||
<option name="screenDensity" value="340" /> | |||
<option name="screenX" value="1840" /> | |||
<option name="screenY" value="2944" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="31" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="a51" /> | |||
<option name="id" value="a51" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy A51" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="akita" /> | |||
<option name="id" value="akita" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 8a" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="b0q" /> | |||
<option name="id" value="b0q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy S22 Ultra" /> | |||
<option name="screenDensity" value="600" /> | |||
<option name="screenX" value="1440" /> | |||
<option name="screenY" value="3088" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="32" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="bluejay" /> | |||
<option name="id" value="bluejay" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 6a" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="caiman" /> | |||
<option name="id" value="caiman" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9 Pro" /> | |||
<option name="screenDensity" value="360" /> | |||
<option name="screenX" value="960" /> | |||
<option name="screenY" value="2142" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="comet" /> | |||
<option name="id" value="comet" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9 Pro Fold" /> | |||
<option name="screenDensity" value="390" /> | |||
<option name="screenX" value="2076" /> | |||
<option name="screenY" value="2152" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="29" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="crownqlteue" /> | |||
<option name="id" value="crownqlteue" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy Note9" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2220" /> | |||
<option name="screenY" value="1080" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="dm3q" /> | |||
<option name="id" value="dm3q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy S23 Ultra" /> | |||
<option name="screenDensity" value="600" /> | |||
<option name="screenX" value="1440" /> | |||
<option name="screenY" value="3088" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="e1q" /> | |||
<option name="id" value="e1q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy S24" /> | |||
<option name="screenDensity" value="480" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2340" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="felix" /> | |||
<option name="id" value="felix" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Fold" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2208" /> | |||
<option name="screenY" value="1840" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="felix" /> | |||
<option name="id" value="felix" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Fold" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2208" /> | |||
<option name="screenY" value="1840" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="felix_camera" /> | |||
<option name="id" value="felix_camera" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Fold (Camera-enabled)" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="2208" /> | |||
<option name="screenY" value="1840" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="gts8uwifi" /> | |||
<option name="id" value="gts8uwifi" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy Tab S8 Ultra" /> | |||
<option name="screenDensity" value="320" /> | |||
<option name="screenX" value="1848" /> | |||
<option name="screenY" value="2960" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="husky" /> | |||
<option name="id" value="husky" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 8 Pro" /> | |||
<option name="screenDensity" value="390" /> | |||
<option name="screenX" value="1008" /> | |||
<option name="screenY" value="2244" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="30" /> | |||
<option name="brand" value="motorola" /> | |||
<option name="codename" value="java" /> | |||
<option name="id" value="java" /> | |||
<option name="manufacturer" value="Motorola" /> | |||
<option name="name" value="G20" /> | |||
<option name="screenDensity" value="280" /> | |||
<option name="screenX" value="720" /> | |||
<option name="screenY" value="1600" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="komodo" /> | |||
<option name="id" value="komodo" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9 Pro XL" /> | |||
<option name="screenDensity" value="360" /> | |||
<option name="screenX" value="1008" /> | |||
<option name="screenY" value="2244" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="lynx" /> | |||
<option name="id" value="lynx" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 7a" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="31" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="oriole" /> | |||
<option name="id" value="oriole" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 6" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="panther" /> | |||
<option name="id" value="panther" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 7" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="q5q" /> | |||
<option name="id" value="q5q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="Galaxy Z Fold5" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1812" /> | |||
<option name="screenY" value="2176" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="samsung" /> | |||
<option name="codename" value="q6q" /> | |||
<option name="id" value="q6q" /> | |||
<option name="manufacturer" value="Samsung" /> | |||
<option name="name" value="SM-F956B" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1856" /> | |||
<option name="screenY" value="2160" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="30" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="r11" /> | |||
<option name="id" value="r11" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Watch" /> | |||
<option name="screenDensity" value="320" /> | |||
<option name="screenX" value="384" /> | |||
<option name="screenY" value="384" /> | |||
<option name="type" value="WEAR_OS" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="30" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="redfin" /> | |||
<option name="id" value="redfin" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 5" /> | |||
<option name="screenDensity" value="440" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2340" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="shiba" /> | |||
<option name="id" value="shiba" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 8" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2400" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="33" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="tangorpro" /> | |||
<option name="id" value="tangorpro" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel Tablet" /> | |||
<option name="screenDensity" value="320" /> | |||
<option name="screenX" value="1600" /> | |||
<option name="screenY" value="2560" /> | |||
</PersistentDeviceSelectionData> | |||
<PersistentDeviceSelectionData> | |||
<option name="api" value="34" /> | |||
<option name="brand" value="google" /> | |||
<option name="codename" value="tokay" /> | |||
<option name="id" value="tokay" /> | |||
<option name="manufacturer" value="Google" /> | |||
<option name="name" value="Pixel 9" /> | |||
<option name="screenDensity" value="420" /> | |||
<option name="screenX" value="1080" /> | |||
<option name="screenY" value="2424" /> | |||
</PersistentDeviceSelectionData> | |||
</list> | |||
</option> | |||
</component> | |||
</project> |
@@ -11,9 +11,9 @@ | |||
"type": "SINGLE", | |||
"filters": [], | |||
"attributes": [], | |||
"versionCode": 109, | |||
"versionName": "1.0.9", | |||
"outputFile": "boluo-xiaochao-v109-202411081647-release.apk" | |||
"versionCode": 111, | |||
"versionName": "1.1.1", | |||
"outputFile": "boluo-xiaochao-v111-202411091521-release.apk" | |||
} | |||
], | |||
"elementType": "File" |
@@ -1637,6 +1637,21 @@ public class ExecuteTheRecipe { | |||
ConfigName.getInstance().IsFirstInit = false; | |||
} | |||
} | |||
if(ConfigName.getInstance().silosAuto){ | |||
int num5 = PreferenceUtils.getInt("silos5",0); | |||
int num6 = PreferenceUtils.getInt("silos6",0); | |||
int num7 = PreferenceUtils.getInt("silos7",0); | |||
if(num5>0){ | |||
ExecuteTheRecipe.WritePLC("料仓5校准值", num5,null); | |||
} | |||
if(num6>0){ | |||
ExecuteTheRecipe.WritePLC("料仓5校准值", num6,null); | |||
} | |||
if(num7>0){ | |||
ExecuteTheRecipe.WritePLC("料仓5校准值", num7,null); | |||
} | |||
} | |||
ExecuteTheRecipe.WritePLC("温控开关", false, null);//开关闭合 | |||
ExecuteTheRecipe.WritePLC("暂停开关", false, null);//开关闭合 | |||
@@ -37,6 +37,8 @@ public class ConfigName { | |||
public boolean is800WithFeeding = false;//是否是800带投料版 有5个投料位 | |||
public boolean isPhoneVersion = false;//是否适配手机 | |||
public boolean isHighVersion = false;//是否适配高版本 | |||
public boolean needAuthorize=true;//需要授权 | |||
public double scale = 1; | |||
//region 单例模式 | |||
@@ -116,7 +118,6 @@ public class ConfigName { | |||
* 验证是否已经授权 | |||
*/ | |||
public boolean IsAuthorize=false; | |||
public boolean needAuthorize=false; | |||
/** | |||
* 是否显示授权提醒 | |||
*/ | |||
@@ -8,6 +8,7 @@ import android.os.Message; | |||
import androidx.core.content.FileProvider; | |||
import com.bonait.bnframework.BuildConfig; | |||
import com.bonait.bnframework.business.ConfigData; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.constant.Constants; | |||
@@ -107,7 +108,7 @@ public class UpdateAppUtils { | |||
//获取apk下载地址 | |||
downloadUrl = version.data.downloadLink; | |||
// 判断Apk是否是最新版本 | |||
if (compareVersions(serviceVersionCode, myVersionCode))//需要更新 | |||
if (compareVersions(serviceVersionCode, BuildConfig.VERSION_NAME))//需要更新 | |||
{ | |||
showUpdateDialog(context); | |||
} else { | |||
@@ -29,6 +29,7 @@ import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL; | |||
import com.bonait.bnframework.common.db.res.lcMode; | |||
import com.bonait.bnframework.common.helper.I.IWriteCallBack; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import com.bonait.bnframework.common.utils.PreferenceUtils; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import org.w3c.dom.Text; | |||
@@ -174,6 +175,13 @@ public class add_silos_message extends LinearLayout { | |||
return; | |||
} | |||
int finalJzzl_ = jzzl_1; | |||
if(mode.num==5){ | |||
PreferenceUtils.setInt("silos5",jzzl_1); | |||
}else if((mode.num==6)){ | |||
PreferenceUtils.setInt("silos6",jzzl_1); | |||
}else if((mode.num==7)){ | |||
PreferenceUtils.setInt("silos7",jzzl_1); | |||
} | |||
ExecuteTheRecipe.WritePLC("料仓" + mode.num + "校准值", jzzl_1, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
@@ -6,6 +6,8 @@ import android.annotation.SuppressLint; | |||
import android.content.Context; | |||
import android.graphics.Rect; | |||
import android.os.Bundle; | |||
import android.text.Editable; | |||
import android.text.TextWatcher; | |||
import android.view.LayoutInflater; | |||
import android.view.MotionEvent; | |||
import android.view.View; | |||
@@ -78,6 +80,7 @@ public class GoodEditClassifyFragment extends BaseFragment { | |||
private long lastTime2; | |||
private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | |||
private ArrayList<BPA_GOODS> goodsListOld = new ArrayList<>(); | |||
public boolean isFast2Click(){ | |||
long curTime = System.currentTimeMillis(); | |||
@@ -142,6 +145,34 @@ public class GoodEditClassifyFragment extends BaseFragment { | |||
* 删除子属性 | |||
*/ | |||
private void initView(){ | |||
viewBinding.edittext.addTextChangedListener(new TextWatcher() { | |||
@Override | |||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||
} | |||
@Override | |||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||
} | |||
@Override | |||
public void afterTextChanged(Editable editable) { | |||
if(editable.toString().isEmpty()){ | |||
goodsList.clear(); | |||
goodsList.addAll(goodsListOld); | |||
goodsAdapter.notifyDataSetChanged(); | |||
}else { | |||
goodsList.clear(); | |||
for(BPA_GOODS bean :goodsListOld){ | |||
if(bean.name.contains(editable.toString())){ | |||
goodsList.add(bean); | |||
} | |||
} | |||
goodsAdapter.notifyDataSetChanged(); | |||
} | |||
} | |||
}); | |||
//下拉选择 | |||
classifyNameList.clear(); | |||
classifyNameList.addAll(classifyList.keySet()); | |||
@@ -259,7 +290,9 @@ public class GoodEditClassifyFragment extends BaseFragment { | |||
}); | |||
viewBinding.recyclerGoods.setAdapter(goodsAdapter); | |||
goodsList.clear(); | |||
goodsListOld.clear(); | |||
goodsList.addAll(GoodsDBUtil.getAll()); | |||
goodsListOld.addAll(GoodsDBUtil.getAll()); | |||
goodsAdapter.setNewData(goodsList); | |||
} | |||
@@ -6,6 +6,8 @@ import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Looper; | |||
import android.os.Message; | |||
import android.text.Editable; | |||
import android.text.TextWatcher; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
@@ -53,6 +55,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
private CloudGoodsAdapter goodsAdapter; | |||
private GoodClassifyAdapter goodClassifyAdapter; | |||
private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | |||
private ArrayList<BPA_GOODS> goodsListOld = new ArrayList<>(); | |||
private ArrayList<BPA_GOODS_CLASSIFY> classifyList = new ArrayList<>(); | |||
private static final int MSG_FRESH_GOODS= 1; | |||
private HomeGoodsViewModel viewModel; | |||
@@ -108,6 +111,34 @@ public class CloudGoodsFragment extends BaseFragment { | |||
@SuppressLint("NotifyDataSetChanged") | |||
private void initView(){ | |||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | |||
viewBinding.edittext.addTextChangedListener(new TextWatcher() { | |||
@Override | |||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||
} | |||
@Override | |||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||
} | |||
@Override | |||
public void afterTextChanged(Editable editable) { | |||
if(editable.toString().isEmpty()){ | |||
goodsList.clear(); | |||
goodsList.addAll(goodsListOld); | |||
goodsAdapter.notifyDataSetChanged(); | |||
}else { | |||
goodsList.clear(); | |||
for(BPA_GOODS bean :goodsListOld){ | |||
if(bean.name.contains(editable.toString())){ | |||
goodsList.add(bean); | |||
} | |||
} | |||
goodsAdapter.notifyDataSetChanged(); | |||
} | |||
} | |||
}); | |||
viewBinding.btnSynchronizedData.setVisibility(isEdit?View.VISIBLE:View.GONE); | |||
viewBinding.btnFresh.setOnClickListener(v->{ | |||
if (ConfigName.getInstance().isFastClick()){ | |||
@@ -218,6 +249,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
private void dealGoodsData(int position){ | |||
goodsList.clear(); | |||
goodsListOld.clear(); | |||
if(!classifyList.isEmpty()){ | |||
String classifyID = classifyList.get(position).id; | |||
LogUtils.d("dealGoodsData classifyID="+classifyID+";classifyList.size="+classifyList.size()); | |||
@@ -240,6 +272,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
} | |||
} | |||
goodsList.add(goods); | |||
goodsListOld.add(goods); | |||
}); | |||
} | |||
} | |||
@@ -258,6 +291,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||
EventBus.getDefault().unregister(this); | |||
if(goodsList!=null){ | |||
goodsList.clear(); | |||
goodsListOld.clear(); | |||
classifyList.clear(); | |||
goodsList = null; | |||
classifyList = null; | |||
@@ -7,6 +7,8 @@ import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Looper; | |||
import android.os.Message; | |||
import android.text.Editable; | |||
import android.text.TextWatcher; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
@@ -65,6 +67,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
private LocalGoodsAdapter goodsAdapter; | |||
private GoodClassifyAdapter goodClassifyAdapter; | |||
private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | |||
private ArrayList<BPA_GOODS> goodsListOld = new ArrayList<>(); | |||
/** | |||
* 商品分类列表 | |||
@@ -99,8 +102,10 @@ public class LocalGoodsFragment extends BaseFragment { | |||
switch (msg.what){ | |||
case MSG_FRESH_GOODS: | |||
goodsList.clear(); | |||
goodsListOld.clear(); | |||
if(!goodClassifyList.isEmpty()){ | |||
goodsList.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(goodClassifyAdapter.getCurrentPosition()).id)); | |||
goodsListOld.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(goodClassifyAdapter.getCurrentPosition()).id)); | |||
goodsAdapter.notifyDataSetChanged(); | |||
} | |||
break; | |||
@@ -137,6 +142,35 @@ public class LocalGoodsFragment extends BaseFragment { | |||
@SuppressLint("NotifyDataSetChanged") | |||
private void initView(){ | |||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | |||
viewBinding.edittext.addTextChangedListener(new TextWatcher() { | |||
@Override | |||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||
} | |||
@Override | |||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||
} | |||
@Override | |||
public void afterTextChanged(Editable editable) { | |||
if(editable.toString().isEmpty()){ | |||
goodsList.clear(); | |||
goodsList.addAll(goodsListOld); | |||
goodsAdapter.notifyDataSetChanged(); | |||
}else { | |||
goodsList.clear(); | |||
for(BPA_GOODS bean :goodsListOld){ | |||
if(bean.name.contains(editable.toString())){ | |||
goodsList.add(bean); | |||
} | |||
} | |||
goodsAdapter.notifyDataSetChanged(); | |||
} | |||
} | |||
}); | |||
viewBinding.allSelectTV.setVisibility(View.GONE); | |||
viewBinding.allSelectTV.setOnClickListener(view->{ | |||
@@ -458,6 +492,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
public void updateData() { | |||
LogUtils.d("updateData"); | |||
goodsList.clear(); | |||
goodsListOld.clear(); | |||
goodClassifyList.clear(); | |||
goodClassifyList.addAll(GoodsClassifyDBUtil.getAll()); | |||
@@ -465,6 +500,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
int last = Math.max(goodClassifyAdapter.getCurrentPosition(), 0); | |||
int last2 = Math.min(last, goodClassifyList.size()-1); | |||
goodsList.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(last2).id)); | |||
goodsListOld.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(last2).id)); | |||
} | |||
goodsAdapter.setNewData(goodsList); | |||
@@ -503,6 +539,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||
EventBus.getDefault().unregister(this); | |||
if(goodsList!=null){ | |||
goodsList.clear(); | |||
goodsListOld.clear(); | |||
goodClassifyList.clear(); | |||
goodsList = null; | |||
goodClassifyList = null; | |||
@@ -11,7 +11,7 @@ | |||
<Button | |||
android:id="@+id/btn_fresh" | |||
android:layout_width="@dimen/dp_250" | |||
android:layout_width="@dimen/dp_120" | |||
android:layout_height="@dimen/dp_70" | |||
android:textSize="@dimen/sp_32" | |||
android:textColor="@color/white" | |||
@@ -67,7 +67,21 @@ | |||
android:layout_height="@dimen/dp_3" | |||
android:background="@color/color3" | |||
/> | |||
<EditText | |||
android:id="@+id/edittext" | |||
android:layout_width="@dimen/dp_300" | |||
android:layout_height="60dp" | |||
android:inputType="text" | |||
android:paddingStart="5dp" | |||
android:paddingEnd="5dp" | |||
android:textColor="@color/foreground" | |||
android:background="@drawable/input_bj" | |||
android:hint=" 筛选" | |||
android:layout_marginTop="10dp" | |||
android:maxLines="1" | |||
android:layout_alignParentEnd="true" | |||
android:layout_marginEnd="170dp" | |||
android:textSize="@dimen/sp_26"/> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:layout_marginLeft="@dimen/dp_161" | |||
android:id="@+id/recycler_goods" | |||
@@ -94,16 +94,35 @@ | |||
android:background="@color/color3" | |||
/> | |||
<EditText | |||
android:id="@+id/edittext" | |||
android:layout_width="@dimen/dp_400" | |||
android:layout_height="60dp" | |||
android:inputType="text" | |||
android:paddingStart="5dp" | |||
android:paddingEnd="5dp" | |||
android:textColor="@color/foreground" | |||
android:background="@drawable/input_bj" | |||
android:hint=" 筛选" | |||
android:layout_marginTop="120dp" | |||
android:layout_marginStart="20dp" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintStart_toStartOf="parent" | |||
android:maxLines="1" | |||
android:layout_alignParentEnd="true" | |||
android:layout_marginEnd="170dp" | |||
android:textSize="@dimen/sp_26"/> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:layout_marginLeft="@dimen/dp_21" | |||
android:layout_marginTop="120dp" | |||
android:layout_marginTop="10dp" | |||
android:id="@+id/recycler_goods" | |||
android:layout_width="match_parent" | |||
app:layout_constraintTop_toBottomOf="@id/edittext" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
android:orientation="vertical" | |||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | |||
app:spanCount="3" | |||
android:layout_height="match_parent"> | |||
android:layout_height="0dp"> | |||
</androidx.recyclerview.widget.RecyclerView> | |||
@@ -128,7 +128,21 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_3" | |||
android:background="@color/color3"/> | |||
<EditText | |||
android:id="@+id/edittext" | |||
android:layout_width="@dimen/dp_300" | |||
android:layout_height="60dp" | |||
android:inputType="text" | |||
android:paddingStart="5dp" | |||
android:paddingEnd="5dp" | |||
android:textColor="@color/foreground" | |||
android:background="@drawable/input_bj" | |||
android:hint=" 筛选" | |||
android:layout_marginTop="10dp" | |||
android:maxLines="1" | |||
android:layout_alignParentEnd="true" | |||
android:layout_marginEnd="170dp" | |||
android:textSize="@dimen/sp_26"/> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:layout_marginTop="83dp" | |||
@@ -35,8 +35,8 @@ task clean(type: Delete) { | |||
ext { // 统一版本入口 | |||
//App版本号 | |||
versionCode = 109 | |||
versionName = "1.0.9" | |||
versionCode = 111 | |||
versionName = "1.1.1" | |||
// 支持Android版本 | |||
buildToolsVersion = "33.0.0" | |||