@@ -4,10 +4,10 @@ | |||||
<selectionStates> | <selectionStates> | ||||
<SelectionState runConfigName="app"> | <SelectionState runConfigName="app"> | ||||
<option name="selectionMode" value="DROPDOWN" /> | <option name="selectionMode" value="DROPDOWN" /> | ||||
<DropdownSelection timestamp="2024-05-29T08:06:21.150986500Z"> | |||||
<DropdownSelection timestamp="2024-05-29T09:08:55.500220600Z"> | |||||
<Target type="DEFAULT_BOOT"> | <Target type="DEFAULT_BOOT"> | ||||
<handle> | <handle> | ||||
<DeviceId pluginId="Default" identifier="serial=192.168.1.7:5555;connection=fd2c211c" /> | |||||
<DeviceId pluginId="Default" identifier="serial=127.0.0.1:7555;connection=65d0277c" /> | |||||
</handle> | </handle> | ||||
</Target> | </Target> | ||||
</DropdownSelection> | </DropdownSelection> | ||||
@@ -13,14 +13,13 @@ import com.bonait.bnframework.common.constant.ConfigName; | |||||
import com.bonait.bnframework.common.constant.MessageName; | import com.bonait.bnframework.common.constant.MessageName; | ||||
import com.bonait.bnframework.common.db.QueryDB; | import com.bonait.bnframework.common.db.QueryDB; | ||||
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_OLD; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_OLD; | |||||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | ||||
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel; | import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel; | ||||
import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET; | import com.bonait.bnframework.common.db.mode.BPA_SYSTEMSET; | ||||
import com.bonait.bnframework.common.db.mode.Res_PLCADDRESS; | |||||
import com.bonait.bnframework.common.helper.ConfigUtil; | import com.bonait.bnframework.common.helper.ConfigUtil; | ||||
import com.bonait.bnframework.common.helper.Json; | import com.bonait.bnframework.common.helper.Json; | ||||
import com.bonait.bnframework.common.http.callback.json.JsonDialogCallback; | import com.bonait.bnframework.common.http.callback.json.JsonDialogCallback; | ||||
@@ -1035,7 +1034,7 @@ public class ConfigData { | |||||
*/ | */ | ||||
public void RevertPLCProcess() { | public void RevertPLCProcess() { | ||||
try { | try { | ||||
List<Res_PLCADDRESS> plcaddresses = ConfigName.getInstance().PlcAddress_大炒; | |||||
// List<Res_PLCADDRESS> plcaddresses = ConfigName.getInstance().PlcAddress_大炒; | |||||
List<ProcessT> processTS = ConfigName.getInstance().Process_桌面小炒; | List<ProcessT> processTS = ConfigName.getInstance().Process_桌面小炒; | ||||
// if (ConfigName.getInstance().versionSelectionEnum.equals("大炒版本")) { | // if (ConfigName.getInstance().versionSelectionEnum.equals("大炒版本")) { | ||||
@@ -255,7 +255,7 @@ public class CookingActivity extends BaseActivity { | |||||
} | } | ||||
} | } | ||||
if( !NewExecuteTheRecipe.IsStart){ | if( !NewExecuteTheRecipe.IsStart){ | ||||
ToastUtils.info("客官,当前菜品已停止炒制!!!"); | |||||
NewToastUtil.getInstance().showToast("客官,当前菜品已停止炒制!!!"); | |||||
break; | break; | ||||
} | } | ||||
boolean status = NewExecuteTheRecipe.Execute(item); | boolean status = NewExecuteTheRecipe.Execute(item); | ||||
@@ -331,7 +331,7 @@ public class DiyProcessActivity extends BaseActivity { | |||||
stepAdapter.notifyDataSetChanged(); | stepAdapter.notifyDataSetChanged(); | ||||
viewBinding.recycleStep.smoothScrollToPosition(processDetails.size()-1); | viewBinding.recycleStep.smoothScrollToPosition(processDetails.size()-1); | ||||
}else { | }else { | ||||
NewToastUtil.getInstance().showToast("参数错误!"); | |||||
// NewToastUtil.getInstance().showToast("参数错误!"); | |||||
} | } | ||||
} | } | ||||
@@ -385,7 +385,6 @@ public class DiyProcessActivity extends BaseActivity { | |||||
NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!"); | NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!"); | ||||
return; | return; | ||||
} | } | ||||
BPA_GOODS_PROCESS_DETAIL processDetail = getSelectItemFromValue(); | |||||
processDetails.set(index_update, getSelectItemFromValue()); | processDetails.set(index_update, getSelectItemFromValue()); | ||||
stepAdapter.notifyDataSetChanged(); | stepAdapter.notifyDataSetChanged(); | ||||
NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!"); | NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!"); | ||||
@@ -24,7 +24,6 @@ import com.bonait.bnframework.common.db.util.SubAttributeGroupDBUtil; | |||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | import com.bonait.bnframework.common.helper.I.MyClickListener; | ||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | import com.bonait.bnframework.common.utils.AlertDialogUtils; | ||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.common.utils.ToastUtils; | |||||
import com.bonait.bnframework.databinding.ActivityEditClassifyBinding; | import com.bonait.bnframework.databinding.ActivityEditClassifyBinding; | ||||
import com.bonait.bnframework.databinding.DialogAddClassifyBinding; | import com.bonait.bnframework.databinding.DialogAddClassifyBinding; | ||||
import com.bonait.bnframework.databinding.DialogDeleteClassifyBinding; | import com.bonait.bnframework.databinding.DialogDeleteClassifyBinding; | ||||
@@ -148,17 +147,43 @@ public class EditClassifyActivity extends BaseActivity { | |||||
viewBinding.listAttribute.setAdapter(attributeAdapter); | viewBinding.listAttribute.setAdapter(attributeAdapter); | ||||
attributeAdapter.notifyDataSetChanged(); | attributeAdapter.notifyDataSetChanged(); | ||||
subattributeAdapter = new SubattributeAdapter(context, R.layout.item_subattribute, subattributeList, new MyClickListener() { | |||||
subattributeAdapter = new SubattributeAdapter(context, R.layout.item_subattribute, subattributeList, new SubattributeAdapter.MyClickListener() { | |||||
@Override | @Override | ||||
public void clickListener(View v, Object data) { | |||||
public void clickName(View v,int position,BPA_SUBATTRIBUTE data) { | |||||
AlertDialogUtils.showCancelAndConfirmDialog(EditClassifyActivity.this, R.layout.dialog_add_classify, (layoutView, xCom) -> { | |||||
DialogAddClassifyBinding binding = DialogAddClassifyBinding.bind(layoutView); | |||||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
binding.title.setText("修改子属性名称"); | |||||
binding.edit.setHint("请输入子属性名称"); | |||||
binding.edit.setText(data.name); | |||||
binding.submit.setOnClickListener(view1 -> { | |||||
String input = String.valueOf(binding.edit.getText()); | |||||
if(!input.isEmpty()){ | |||||
for(BPA_SUBATTRIBUTE bean:subattributeList){ | |||||
if(bean.name.equals(input)){ | |||||
NewToastUtil.getInstance().showToast("已有该子属性,请换一个名称!"); | |||||
return; | |||||
} | |||||
} | |||||
BPA_SUBATTRIBUTE subattribute = (BPA_SUBATTRIBUTE)data; | |||||
subattribute.name = input; | |||||
SubAttributeDBUtil.update(subattribute); | |||||
subattributeAdapter.notifyDataSetChanged(); | |||||
if(position-1>=0 && !subattributeList.isEmpty()){ | |||||
viewBinding.listSubattribute.smoothScrollToPosition(position-1); | |||||
} | |||||
xCom.dismissX(); | |||||
}else { | |||||
NewToastUtil.getInstance().showToast("名称不能为空!"); | |||||
} | |||||
}); | |||||
}); | |||||
} | } | ||||
@Override | @Override | ||||
public void clickListenerNew(View v, int k, Object data) { | |||||
public void clickDelete(View v,int position,BPA_SUBATTRIBUTE data) { | |||||
//删除 | //删除 | ||||
removeSubAttribute(k,data); | |||||
removeSubAttribute(position,data); | |||||
} | } | ||||
}); | }); | ||||
viewBinding.listSubattribute.setAdapter(subattributeAdapter); | viewBinding.listSubattribute.setAdapter(subattributeAdapter); | ||||
@@ -198,7 +223,7 @@ public class EditClassifyActivity extends BaseActivity { | |||||
@SuppressLint("NonConstantResourceId") | @SuppressLint("NonConstantResourceId") | ||||
@OnClick({R.id.btn_add_classify,R.id.btn_update_classify,R.id.btn_add_attribute,R.id.btn_delete_attribute,R.id.btn_add_subattribute,R.id.btn_delete_classify}) | |||||
@OnClick({R.id.btn_add_classify,R.id.btn_update_attribute,R.id.btn_update_classify,R.id.btn_add_attribute,R.id.btn_delete_attribute,R.id.btn_add_subattribute,R.id.btn_delete_classify}) | |||||
public void onViewClicked(View view) { | public void onViewClicked(View view) { | ||||
switch (view.getId()){ | switch (view.getId()){ | ||||
@@ -217,6 +242,9 @@ public class EditClassifyActivity extends BaseActivity { | |||||
case R.id.btn_delete_attribute://删除属性 | case R.id.btn_delete_attribute://删除属性 | ||||
removeAttribute(); | removeAttribute(); | ||||
break; | break; | ||||
case R.id.btn_update_attribute://删除属性 | |||||
updateAttribute(); | |||||
break; | |||||
case R.id.btn_add_subattribute://添加子属性 | case R.id.btn_add_subattribute://添加子属性 | ||||
addSubAttribute(); | addSubAttribute(); | ||||
break; | break; | ||||
@@ -237,7 +265,7 @@ public class EditClassifyActivity extends BaseActivity { | |||||
if(!input.isEmpty()){ | if(!input.isEmpty()){ | ||||
for (Map.Entry<String, String> entry : classifyList.entrySet()) { | for (Map.Entry<String, String> entry : classifyList.entrySet()) { | ||||
if(entry.getKey().equals(input)){ | if(entry.getKey().equals(input)){ | ||||
ToastUtils.info("已有该分类,请换一个名称!"); | |||||
NewToastUtil.getInstance().showToast("已有该分类,请换一个名称!"); | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
@@ -251,13 +279,13 @@ public class EditClassifyActivity extends BaseActivity { | |||||
spinnerAdapter.notifyDataSetChanged(); | spinnerAdapter.notifyDataSetChanged(); | ||||
selectClassify(classifyList.size()-1);//更新数据 | selectClassify(classifyList.size()-1);//更新数据 | ||||
ToastUtils.info("添加["+input+"]成功!"); | |||||
NewToastUtil.getInstance().showToast("添加["+input+"]成功!"); | |||||
}else { | }else { | ||||
ToastUtils.info("添加["+input+"]失败!"); | |||||
NewToastUtil.getInstance().showToast("添加["+input+"]失败!"); | |||||
} | } | ||||
xCom.dismissX(); | xCom.dismissX(); | ||||
}else { | }else { | ||||
ToastUtils.info("名称不能为空!"); | |||||
NewToastUtil.getInstance().showToast("名称不能为空!"); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -282,7 +310,7 @@ public class EditClassifyActivity extends BaseActivity { | |||||
if(!input.isEmpty()){ | if(!input.isEmpty()){ | ||||
for (Map.Entry<String, String> entry : classifyList.entrySet()) { | for (Map.Entry<String, String> entry : classifyList.entrySet()) { | ||||
if(entry.getKey().equals(input)){ | if(entry.getKey().equals(input)){ | ||||
ToastUtils.info("已有该分类,请换一个名称!"); | |||||
NewToastUtil.getInstance().showToast("已有该分类,请换一个名称!"); | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
@@ -300,7 +328,7 @@ public class EditClassifyActivity extends BaseActivity { | |||||
xCom.dismissX(); | xCom.dismissX(); | ||||
}else { | }else { | ||||
ToastUtils.info("名称不能为空!"); | |||||
NewToastUtil.getInstance().showToast("名称不能为空!"); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -333,10 +361,10 @@ public class EditClassifyActivity extends BaseActivity { | |||||
classifyNameList.addAll(classifyList.keySet()); | classifyNameList.addAll(classifyList.keySet()); | ||||
spinnerAdapter.notifyDataSetChanged(); | spinnerAdapter.notifyDataSetChanged(); | ||||
selectClassify(classifyPosition-1);//更新数据 | selectClassify(classifyPosition-1);//更新数据 | ||||
ToastUtils.info("删除["+classifyName+"]成功!"); | |||||
NewToastUtil.getInstance().showToast("删除["+classifyName+"]成功!"); | |||||
xCom.dismissX(); | xCom.dismissX(); | ||||
}else { | }else { | ||||
ToastUtils.info("删除["+classifyName+"]失败!"); | |||||
NewToastUtil.getInstance().showToast("删除["+classifyName+"]失败!"); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -362,7 +390,7 @@ public class EditClassifyActivity extends BaseActivity { | |||||
if(!input.isEmpty()){ | if(!input.isEmpty()){ | ||||
for(BPA_ATTRIBUTE bean:attributeList){ | for(BPA_ATTRIBUTE bean:attributeList){ | ||||
if(bean.name.equals(input)){ | if(bean.name.equals(input)){ | ||||
ToastUtils.info("已有该属性,请换一个名称!"); | |||||
NewToastUtil.getInstance().showToast("已有该属性,请换一个名称!"); | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
@@ -374,11 +402,12 @@ public class EditClassifyActivity extends BaseActivity { | |||||
attributeList.add(attribute); | attributeList.add(attribute); | ||||
attributePosition = attributeList.size()-1; | attributePosition = attributeList.size()-1; | ||||
attributeAdapter.setSelectPosition(attributeList.size()-1); | attributeAdapter.setSelectPosition(attributeList.size()-1); | ||||
viewBinding.listAttribute.smoothScrollToPosition(attributePosition); | |||||
attributeAdapter.notifyDataSetChanged(); | attributeAdapter.notifyDataSetChanged(); | ||||
subattributeList.clear(); | subattributeList.clear(); | ||||
subattributeAdapter.notifyDataSetChanged(); | subattributeAdapter.notifyDataSetChanged(); | ||||
}else { | }else { | ||||
ToastUtils.info("名称不能为空!"); | |||||
NewToastUtil.getInstance().showToast("名称不能为空!"); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -419,6 +448,42 @@ public class EditClassifyActivity extends BaseActivity { | |||||
} | } | ||||
} | } | ||||
/** | |||||
* 修改属性 | |||||
*/ | |||||
private void updateAttribute(){ | |||||
if(classifyPosition==0){ | |||||
return; | |||||
} | |||||
if(attributePosition>=0&&attributePosition<attributeList.size()){ | |||||
AlertDialogUtils.showCancelAndConfirmDialog(this, R.layout.dialog_add_classify, (layoutView, xCom) -> { | |||||
DialogAddClassifyBinding binding = DialogAddClassifyBinding.bind(layoutView); | |||||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
binding.title.setText("修改属性名称"); | |||||
binding.edit.setHint("请输入属性名称"); | |||||
binding.edit.setText(attributeList.get(attributePosition).name); | |||||
binding.submit.setOnClickListener(view1 -> { | |||||
String input = String.valueOf(binding.edit.getText()); | |||||
if(!input.isEmpty()){ | |||||
for(BPA_ATTRIBUTE bean:attributeList){ | |||||
if(bean.name.equals(input)){ | |||||
NewToastUtil.getInstance().showToast("已有该属性,请换一个名称!"); | |||||
return; | |||||
} | |||||
} | |||||
BPA_ATTRIBUTE attribute = attributeList.get(attributePosition); | |||||
attribute.name = input; | |||||
AttributeDBUtil.update(attribute); | |||||
attributeAdapter.notifyDataSetChanged(); | |||||
xCom.dismissX(); | |||||
}else { | |||||
NewToastUtil.getInstance().showToast("名称不能为空!"); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
} | |||||
/** | /** | ||||
* 添加子属性 | * 添加子属性 | ||||
*/ | */ | ||||
@@ -426,6 +491,10 @@ public class EditClassifyActivity extends BaseActivity { | |||||
if(classifyPosition==0){ | if(classifyPosition==0){ | ||||
return; | return; | ||||
} | } | ||||
if(attributeList.size()<=0){ | |||||
NewToastUtil.getInstance().showToast("请先添加属性"); | |||||
return; | |||||
} | |||||
AlertDialogUtils.showCancelAndConfirmDialog(this, R.layout.dialog_add_classify, (layoutView, xCom) -> { | AlertDialogUtils.showCancelAndConfirmDialog(this, R.layout.dialog_add_classify, (layoutView, xCom) -> { | ||||
DialogAddClassifyBinding binding = DialogAddClassifyBinding.bind(layoutView); | DialogAddClassifyBinding binding = DialogAddClassifyBinding.bind(layoutView); | ||||
DisplayManager.scaleViewGroup(binding.getRoot()); | DisplayManager.scaleViewGroup(binding.getRoot()); | ||||
@@ -437,7 +506,7 @@ public class EditClassifyActivity extends BaseActivity { | |||||
if(!input.isEmpty()){ | if(!input.isEmpty()){ | ||||
for(BPA_SUBATTRIBUTE bean:subattributeList){ | for(BPA_SUBATTRIBUTE bean:subattributeList){ | ||||
if(bean.name.equals(input)){ | if(bean.name.equals(input)){ | ||||
ToastUtils.info("已有该子属性,请换一个名称!"); | |||||
NewToastUtil.getInstance().showToast("已有该子属性,请换一个名称!"); | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
@@ -448,8 +517,9 @@ public class EditClassifyActivity extends BaseActivity { | |||||
xCom.dismissX(); | xCom.dismissX(); | ||||
subattributeList.add(subattribute); | subattributeList.add(subattribute); | ||||
subattributeAdapter.notifyDataSetChanged(); | subattributeAdapter.notifyDataSetChanged(); | ||||
viewBinding.listSubattribute.smoothScrollToPosition(subattributeList.size()-1); | |||||
}else { | }else { | ||||
ToastUtils.info("名称不能为空!"); | |||||
NewToastUtil.getInstance().showToast("名称不能为空!"); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -470,6 +540,9 @@ public class EditClassifyActivity extends BaseActivity { | |||||
} | } | ||||
SubAttributeDBUtil.delete(bean); | SubAttributeDBUtil.delete(bean); | ||||
subattributeList.remove(position); | subattributeList.remove(position); | ||||
if(position-1>=0 && !subattributeList.isEmpty()){ | |||||
viewBinding.listSubattribute.smoothScrollToPosition(position-1); | |||||
} | |||||
subattributeAdapter.notifyDataSetChanged(); | subattributeAdapter.notifyDataSetChanged(); | ||||
} | } | ||||
@@ -32,6 +32,12 @@ public class SelectAttributeListAdapter extends ArrayAdapter<BPA_ATTRIBUTE> { | |||||
private List<SelectSubAttributeAdapter> subAttributeAdapters = new ArrayList<>(); | private List<SelectSubAttributeAdapter> subAttributeAdapters = new ArrayList<>(); | ||||
private int resource1; | private int resource1; | ||||
public List<BPA_ATTRIBUTE> datas; | public List<BPA_ATTRIBUTE> datas; | ||||
private String groupIdList=""; | |||||
public void setGroupIdList(String groupIdList) { | |||||
this.groupIdList = groupIdList; | |||||
} | |||||
public SelectAttributeListAdapter(@NonNull Context context, int resource, @NonNull List<BPA_ATTRIBUTE> objects) { | public SelectAttributeListAdapter(@NonNull Context context, int resource, @NonNull List<BPA_ATTRIBUTE> objects) { | ||||
super(context, resource, objects); | super(context, resource, objects); | ||||
subAttributeAdapters.clear(); | subAttributeAdapters.clear(); | ||||
@@ -59,9 +65,10 @@ public class SelectAttributeListAdapter extends ArrayAdapter<BPA_ATTRIBUTE> { | |||||
if(recyclerView.getAdapter()==null && position == subAttributeAdapters.size()){ | if(recyclerView.getAdapter()==null && position == subAttributeAdapters.size()){ | ||||
List<BPA_SUBATTRIBUTE> subattributeList = SubAttributeDBUtil.getByParentAttributeId(bean.id); | List<BPA_SUBATTRIBUTE> subattributeList = SubAttributeDBUtil.getByParentAttributeId(bean.id); | ||||
SelectSubAttributeAdapter adapter = new SelectSubAttributeAdapter(); | SelectSubAttributeAdapter adapter = new SelectSubAttributeAdapter(); | ||||
adapter.setGroupIdList(groupIdList); | |||||
adapter.setNewData(subattributeList); | adapter.setNewData(subattributeList); | ||||
adapter.setListener(listener); | adapter.setListener(listener); | ||||
adapter.setCurrentPosition(0); | |||||
adapter.setCurrentPosition(-1); | |||||
recyclerView.setAdapter(adapter); | recyclerView.setAdapter(adapter); | ||||
LogUtils.d(" SelectAttributeListAdapter getView position="+position); | LogUtils.d(" SelectAttributeListAdapter getView position="+position); | ||||
if(position == subAttributeAdapters.size()){ | if(position == subAttributeAdapters.size()){ | ||||
@@ -26,6 +26,12 @@ public class SelectSubAttributeAdapter extends BaseAdapter<BPA_SUBATTRIBUTE,Sele | |||||
this.listener = listener; | this.listener = listener; | ||||
} | } | ||||
private String groupIdList=""; | |||||
public void setGroupIdList(String groupIdList) { | |||||
this.groupIdList = groupIdList; | |||||
} | |||||
@NonNull | @NonNull | ||||
@Override | @Override | ||||
public SelectSubAttributeAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { | public SelectSubAttributeAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { | ||||
@@ -39,9 +45,22 @@ public class SelectSubAttributeAdapter extends BaseAdapter<BPA_SUBATTRIBUTE,Sele | |||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | DisplayManager.scaleViewGroup(holder.binding.getRoot()); | ||||
} | } | ||||
BPA_SUBATTRIBUTE subattribute = mData.get(position); | BPA_SUBATTRIBUTE subattribute = mData.get(position); | ||||
if(groupIdList.contains("-")){ | |||||
String[] res = groupIdList.split("-"); | |||||
for(String s : res){ | |||||
if(s.equals(subattribute.name)){ | |||||
mCurrentPosition = position; | |||||
} | |||||
} | |||||
}else { | |||||
if(subattribute.name.equals(groupIdList)){ | |||||
mCurrentPosition = position; | |||||
} | |||||
} | |||||
holder.binding.name.setText(subattribute.name+""); | holder.binding.name.setText(subattribute.name+""); | ||||
holder.binding.name.setSelected(mCurrentPosition == position); | holder.binding.name.setSelected(mCurrentPosition == position); | ||||
holder.binding.name.setOnClickListener(new View.OnClickListener() { | holder.binding.name.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
@@ -12,7 +12,6 @@ import androidx.annotation.Nullable; | |||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE; | import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -47,13 +46,23 @@ public class SubattributeAdapter extends ArrayAdapter<BPA_SUBATTRIBUTE> { | |||||
DisplayManager.scaleViewGroup(view.findViewById(R.id.root)); | DisplayManager.scaleViewGroup(view.findViewById(R.id.root)); | ||||
name.setText(bean.name+""); | name.setText(bean.name+""); | ||||
name.setOnClickListener(new View.OnClickListener() { | |||||
@Override | |||||
public void onClick(View view) { | |||||
if(mListener!=null) mListener.clickName(view,position,bean); | |||||
} | |||||
}); | |||||
delete.setOnClickListener(new View.OnClickListener() { | delete.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
if(mListener!=null) mListener.clickListenerNew(view,position,bean); | |||||
if(mListener!=null) mListener.clickDelete(view,position,bean); | |||||
} | } | ||||
}); | }); | ||||
return view; | return view; | ||||
} | } | ||||
public interface MyClickListener{ | |||||
void clickDelete(View v,int position,BPA_SUBATTRIBUTE data); | |||||
void clickName(View v,int position,BPA_SUBATTRIBUTE data); | |||||
} | |||||
} | } |
@@ -127,12 +127,15 @@ public class AttributeSelectDialog extends DialogFragment { | |||||
dismiss(); | dismiss(); | ||||
}); | }); | ||||
viewBinding.btnSubmit.setOnClickListener(view -> { | viewBinding.btnSubmit.setOnClickListener(view -> { | ||||
if(!selectAttributeListAdapter.isAllSelected()){ | |||||
if(getContext()!=null){ | |||||
NewToastUtil.getInstance().showToast("请选择每行对应的子属性"); | |||||
} | |||||
return; | |||||
} | |||||
// if(hasGroup().isEmpty()){ | |||||
// NewToastUtil.getInstance().showToast("请选择每行对应的子属性"); | |||||
// } | |||||
// if(!selectAttributeListAdapter.isAllSelected()){ | |||||
// if(getContext()!=null){ | |||||
// NewToastUtil.getInstance().showToast("请选择每行对应的子属性"); | |||||
// } | |||||
// return; | |||||
// } | |||||
BPA_GOODS_SUBATTRIBUTE_GROUP currentGroupBean = SubAttributeGroupDBUtil.getById(groupId); | BPA_GOODS_SUBATTRIBUTE_GROUP currentGroupBean = SubAttributeGroupDBUtil.getById(groupId); | ||||
if(currentGroupBean!=null){ | if(currentGroupBean!=null){ | ||||
if(selectAttributeListAdapter.getSubAttributeIdList().equals(currentGroupBean.subAttributeIdList)){ | if(selectAttributeListAdapter.getSubAttributeIdList().equals(currentGroupBean.subAttributeIdList)){ | ||||
@@ -182,6 +185,41 @@ public class AttributeSelectDialog extends DialogFragment { | |||||
}); | }); | ||||
} | } | ||||
/** | |||||
* 判断是否存在该组合 | |||||
*/ | |||||
private String hasGroup(){ | |||||
String groupId = ""; | |||||
String idList = selectAttributeListAdapter.getSubAttributeIdList(); | |||||
for(BPA_GOODS_SUBATTRIBUTE_GROUP bean : SubAttributeGroupDBUtil.getByGoodsId(goods.id)){ | |||||
if(bean.subAttributeIdList.equals(idList)){ | |||||
groupId = bean.id; | |||||
break; | |||||
}else if(bean.subAttributeIdList.contains(",")&&idList.contains(",")){ | |||||
String[] res = bean.subAttributeIdList.split(","); | |||||
String[] res2 = idList.split(","); | |||||
if (res.length == res2.length) { | |||||
boolean xx = true; | |||||
for (String s : res) { | |||||
if (!idList.contains(s)) { | |||||
xx = false; | |||||
break; | |||||
} | |||||
} | |||||
if (xx) { | |||||
groupId = bean.id; | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
LogUtils.d(TAG+"hasGroup groupId="+groupId); | |||||
if(groupId.isEmpty()){ | |||||
return ""; | |||||
} | |||||
return groupId; | |||||
} | |||||
public interface DialogCallBack{ | public interface DialogCallBack{ | ||||
void submit(); | void submit(); | ||||
} | } |
@@ -8,10 +8,12 @@ import android.graphics.drawable.ColorDrawable; | |||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.view.Gravity; | import android.view.Gravity; | ||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.MotionEvent; | |||||
import android.view.View; | import android.view.View; | ||||
import android.view.ViewGroup; | import android.view.ViewGroup; | ||||
import android.view.Window; | import android.view.Window; | ||||
import android.view.WindowManager; | import android.view.WindowManager; | ||||
import android.widget.AdapterView; | |||||
import androidx.annotation.NonNull; | import androidx.annotation.NonNull; | ||||
import androidx.annotation.Nullable; | import androidx.annotation.Nullable; | ||||
@@ -122,7 +124,8 @@ public class EditGoodsDialog extends DialogFragment { | |||||
window.setAttributes(params); | window.setAttributes(params); | ||||
} | } | ||||
initView(); | initView(); | ||||
updateAttributeData(); | |||||
updateAttributeData(""); | |||||
groupSpinnerView(); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -168,12 +171,12 @@ public class EditGoodsDialog extends DialogFragment { | |||||
} | } | ||||
break; | break; | ||||
case R.id.btn_next2: | case R.id.btn_next2: | ||||
if(!selectAttributeListAdapter.isAllSelected()){ | |||||
if(getContext()!=null){ | |||||
NewToastUtil.getInstance().showToast("请选择每行对应的子属性"); | |||||
} | |||||
return; | |||||
} | |||||
// if(!selectAttributeListAdapter.isAllSelected()){ | |||||
// if(getContext()!=null){ | |||||
// NewToastUtil.getInstance().showToast("请选择每行对应的子属性"); | |||||
// } | |||||
// return; | |||||
// } | |||||
if(!hasGroup().isEmpty()){ | if(!hasGroup().isEmpty()){ | ||||
changePage(3); | changePage(3); | ||||
}else { | }else { | ||||
@@ -445,23 +448,10 @@ public class EditGoodsDialog extends DialogFragment { | |||||
/** | /** | ||||
* 刷新属性数据 | * 刷新属性数据 | ||||
*/ | */ | ||||
public void updateAttributeData(){ | |||||
public void updateAttributeData(String nameList){ | |||||
LogUtils.d(TAG+" updateAttributeData"); | LogUtils.d(TAG+" updateAttributeData"); | ||||
groupList.clear(); | |||||
groupList.add("未选择"); | |||||
for (BPA_GOODS_SUBATTRIBUTE_GROUP group : SubAttributeGroupDBUtil.getByGoodsId(goodId)){ | |||||
groupList.add(group.name); | |||||
} | |||||
int pos = 0; | |||||
for(int i =0;i<groupList.size();i++){ | |||||
if(groupList.get(i).equals(selectAttributeListAdapter.getSubAttributeNameList())){ | |||||
pos = i+1; | |||||
} | |||||
} | |||||
spinnerAdapter = new ClassifySpinnerAdapter(getContext(), groupList); | |||||
viewBinding.layoutAttribute.spinnerList.setAdapter(spinnerAdapter); | |||||
viewBinding.layoutAttribute.spinnerList.setSelection(pos); | |||||
selectAttributeListAdapter = new SelectAttributeListAdapter(getContext(), R.layout.item_select_attribute_list,attributeList); | selectAttributeListAdapter = new SelectAttributeListAdapter(getContext(), R.layout.item_select_attribute_list,attributeList); | ||||
selectAttributeListAdapter.setGroupIdList(nameList); | |||||
selectAttributeListAdapter.setListener(new SelectAttributeListAdapter.CallBackListener() { | selectAttributeListAdapter.setListener(new SelectAttributeListAdapter.CallBackListener() { | ||||
@Override | @Override | ||||
public void onClick() { | public void onClick() { | ||||
@@ -470,7 +460,7 @@ public class EditGoodsDialog extends DialogFragment { | |||||
int pos = 0; | int pos = 0; | ||||
for(int i =0;i<groupList.size();i++){ | for(int i =0;i<groupList.size();i++){ | ||||
if(groupList.get(i).equals(selectAttributeListAdapter.getSubAttributeNameList())){ | if(groupList.get(i).equals(selectAttributeListAdapter.getSubAttributeNameList())){ | ||||
pos = i+1; | |||||
pos = i; | |||||
} | } | ||||
} | } | ||||
viewBinding.layoutAttribute.spinnerList.setSelection(pos); | viewBinding.layoutAttribute.spinnerList.setSelection(pos); | ||||
@@ -480,6 +470,56 @@ public class EditGoodsDialog extends DialogFragment { | |||||
} | } | ||||
}); | }); | ||||
viewBinding.layoutAttribute.listAttribute.setAdapter(selectAttributeListAdapter); | viewBinding.layoutAttribute.listAttribute.setAdapter(selectAttributeListAdapter); | ||||
} | |||||
private boolean isUserClicked = false; | |||||
private void groupSpinnerView(){ | |||||
groupList.clear(); | |||||
groupList.add("未选择"); | |||||
for (BPA_GOODS_SUBATTRIBUTE_GROUP group : SubAttributeGroupDBUtil.getByGoodsId(goodId)){ | |||||
if(group.name!=null&&!group.name.isEmpty()){ | |||||
groupList.add(group.name); | |||||
} | |||||
} | |||||
int pos = 0; | |||||
// for(int i =0;i<groupList.size();i++){ | |||||
// if(groupList.get(i).equals(selectAttributeListAdapter.getSubAttributeNameList())){ | |||||
// pos = i+1; | |||||
// } | |||||
// } | |||||
spinnerAdapter = new ClassifySpinnerAdapter(getContext(), groupList); | |||||
viewBinding.layoutAttribute.spinnerList.setAdapter(spinnerAdapter); | |||||
viewBinding.layoutAttribute.spinnerList.setSelection(pos); | |||||
viewBinding.layoutAttribute.spinnerList.setOnTouchListener(new View.OnTouchListener() { | |||||
@Override | |||||
public boolean onTouch(View view, MotionEvent motionEvent) { | |||||
isUserClicked = true; | |||||
view.performClick(); | |||||
return false; | |||||
} | |||||
}); | |||||
viewBinding.layoutAttribute.spinnerList.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |||||
@Override | |||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { | |||||
if(isUserClicked){ | |||||
if(i==0){ | |||||
viewBinding.layoutAttribute.groupDesc.setText(""); | |||||
updateAttributeData(viewBinding.layoutAttribute.spinnerList.getSelectedItem().toString()); | |||||
}else { | |||||
updateAttributeData(viewBinding.layoutAttribute.spinnerList.getSelectedItem().toString()); | |||||
viewBinding.layoutAttribute.groupDesc.setText("存在该组合"); | |||||
} | |||||
isUserClicked = false; | |||||
} | |||||
} | |||||
@Override | |||||
public void onNothingSelected(AdapterView<?> adapterView) { | |||||
} | |||||
}); | |||||
} | } | ||||
/** | /** | ||||
@@ -143,7 +143,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||||
DialogDeleteClassifyBinding binding = DialogDeleteClassifyBinding.bind(layoutView); | DialogDeleteClassifyBinding binding = DialogDeleteClassifyBinding.bind(layoutView); | ||||
DisplayManager.scaleViewGroup(binding.getRoot()); | DisplayManager.scaleViewGroup(binding.getRoot()); | ||||
binding.title.setText("删除菜品"); | binding.title.setText("删除菜品"); | ||||
binding.edit.setText("是否删除["+bean.name+"]下所有属性组合配方?"); | |||||
binding.edit.setText("是否删除["+bean.name+"]下所有组合配方?"); | |||||
binding.cancel.setOnClickListener(view1 ->{ | binding.cancel.setOnClickListener(view1 ->{ | ||||
xCom.dismissX(); | xCom.dismissX(); | ||||
}); | }); | ||||
@@ -128,7 +128,7 @@ | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:divider="@color/color3" | android:divider="@color/color3" | ||||
android:dividerHeight="@dimen/dp_1" | android:dividerHeight="@dimen/dp_1" | ||||
android:layout_marginBottom="@dimen/dp_200" | |||||
android:layout_marginBottom="@dimen/dp_290" | |||||
/> | /> | ||||
<TextView | <TextView | ||||
@@ -158,6 +158,20 @@ | |||||
android:layout_alignBottom="@id/list_attribute" | android:layout_alignBottom="@id/list_attribute" | ||||
android:layout_marginBottom="-180dp" | android:layout_marginBottom="-180dp" | ||||
/> | /> | ||||
<TextView | |||||
android:id="@+id/btn_update_attribute" | |||||
android:layout_width="@dimen/dp_235" | |||||
android:layout_height="@dimen/dp_70" | |||||
android:layout_centerHorizontal="true" | |||||
android:background="@drawable/bg_round15_yellow_btn" | |||||
android:text="修改属性" | |||||
android:textColor="@color/white" | |||||
android:gravity="center" | |||||
android:textSize="@dimen/sp_32" | |||||
android:layout_alignBottom="@id/list_attribute" | |||||
android:layout_marginBottom="-270dp" | |||||
/> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -43,7 +43,12 @@ | |||||
android:background="@drawable/bg_tab_text" | android:background="@drawable/bg_tab_text" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:textSize="@dimen/sp_32" | android:textSize="@dimen/sp_32" | ||||
android:layout_height="match_parent"/> | |||||
android:layout_height="match_parent" | |||||
android:focusableInTouchMode="true" | |||||
android:focusable="true" | |||||
> | |||||
<requestFocus/> | |||||
</TextView> | |||||
<TextView | <TextView | ||||
android:id="@+id/tv_silos" | android:id="@+id/tv_silos" | ||||
@@ -54,7 +59,10 @@ | |||||
android:textSize="@dimen/sp_32" | android:textSize="@dimen/sp_32" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:textColor="@drawable/bg_tab_text_color_selector" | android:textColor="@drawable/bg_tab_text_color_selector" | ||||
android:layout_height="match_parent"/> | |||||
android:layout_height="match_parent" | |||||
android:focusableInTouchMode="true" | |||||
android:focusable="true" | |||||
/> | |||||
</LinearLayout> | </LinearLayout> | ||||
@@ -7,8 +7,8 @@ | |||||
android:layout_height="wrap_content"> | android:layout_height="wrap_content"> | ||||
<!--子属性选择--> | <!--子属性选择--> | ||||
<androidx.constraintlayout.widget.ConstraintLayout | <androidx.constraintlayout.widget.ConstraintLayout | ||||
android:layout_width="@dimen/dp_660" | |||||
android:layout_height="wrap_content" | |||||
android:layout_width="@dimen/dp_740" | |||||
android:layout_height="@dimen/dp_1100" | |||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintRight_toRightOf="parent" | app:layout_constraintRight_toRightOf="parent" | ||||
app:layout_constraintTop_toTopOf="parent" | app:layout_constraintTop_toTopOf="parent" | ||||
@@ -28,24 +28,23 @@ | |||||
<ListView | <ListView | ||||
android:id="@+id/list_attribute" | android:id="@+id/list_attribute" | ||||
android:layout_width="@dimen/dp_620" | |||||
android:layout_height="wrap_content" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="0dp" | |||||
app:layout_constraintTop_toBottomOf="@id/title2" | app:layout_constraintTop_toBottomOf="@id/title2" | ||||
app:layout_constraintBottom_toTopOf="@id/btn_submit" | |||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
android:layout_margin="@dimen/dp_20" | android:layout_margin="@dimen/dp_20" | ||||
android:divider="#00000000" | android:divider="#00000000" | ||||
android:orientation="vertical" | android:orientation="vertical" | ||||
tools:layout_height="@dimen/dp_500" | |||||
/> | /> | ||||
<TextView | <TextView | ||||
android:id="@+id/btn_submit" | android:id="@+id/btn_submit" | ||||
android:layout_width="@dimen/dp_155" | android:layout_width="@dimen/dp_155" | ||||
android:layout_height="@dimen/dp_80" | android:layout_height="@dimen/dp_80" | ||||
app:layout_constraintTop_toBottomOf="@id/list_attribute" | |||||
app:layout_constraintLeft_toLeftOf="parent" | |||||
app:layout_constraintRight_toRightOf="parent" | |||||
app:layout_constraintBottom_toBottomOf="parent" | app:layout_constraintBottom_toBottomOf="parent" | ||||
android:layout_marginLeft="@dimen/dp_480" | |||||
android:layout_marginEnd="@dimen/dp_20" | |||||
android:layout_marginBottom="@dimen/dp_20" | android:layout_marginBottom="@dimen/dp_20" | ||||
android:layout_marginTop="@dimen/dp_30" | android:layout_marginTop="@dimen/dp_30" | ||||
style="@style/TextView_btn_dialog" | style="@style/TextView_btn_dialog" | ||||
@@ -57,7 +56,6 @@ | |||||
android:layout_width="@dimen/dp_155" | android:layout_width="@dimen/dp_155" | ||||
android:layout_height="@dimen/dp_80" | android:layout_height="@dimen/dp_80" | ||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintTop_toBottomOf="@id/list_attribute" | |||||
app:layout_constraintBottom_toBottomOf="parent" | app:layout_constraintBottom_toBottomOf="parent" | ||||
android:layout_marginLeft="@dimen/dp_20" | android:layout_marginLeft="@dimen/dp_20" | ||||
android:layout_marginTop="@dimen/dp_30" | android:layout_marginTop="@dimen/dp_30" | ||||
@@ -9,7 +9,7 @@ | |||||
<FrameLayout | <FrameLayout | ||||
android:layout_width="@dimen/dp_700" | android:layout_width="@dimen/dp_700" | ||||
android:layout_height="@dimen/dp_350" | |||||
android:layout_height="wrap_content" | |||||
android:layout_gravity="center" | android:layout_gravity="center" | ||||
android:background="@drawable/bg_round25_white" | android:background="@drawable/bg_round25_white" | ||||
> | > | ||||
@@ -27,17 +27,17 @@ | |||||
<TextView | <TextView | ||||
android:id="@+id/edit" | android:id="@+id/edit" | ||||
android:layout_width="@dimen/dp_500" | android:layout_width="@dimen/dp_500" | ||||
android:layout_height="@dimen/dp_100" | |||||
android:layout_height="wrap_content" | |||||
app:layout_constraintLeft_toRightOf="@id/title" | app:layout_constraintLeft_toRightOf="@id/title" | ||||
app:layout_constraintTop_toTopOf="@id/title" | app:layout_constraintTop_toTopOf="@id/title" | ||||
android:textSize="@dimen/sp_36" | android:textSize="@dimen/sp_36" | ||||
android:text="是否删除?" | android:text="是否删除?" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:maxLines="1" | |||||
android:maxLength="15" | |||||
android:paddingLeft="@dimen/dp_10" | android:paddingLeft="@dimen/dp_10" | ||||
android:paddingRight="@dimen/dp_10" | android:paddingRight="@dimen/dp_10" | ||||
android:layout_gravity="center" | android:layout_gravity="center" | ||||
android:layout_marginTop="@dimen/dp_150" | |||||
android:layout_marginBottom="@dimen/dp_150" | |||||
/> | /> | ||||
<Button | <Button | ||||
android:id="@+id/cancel" | android:id="@+id/cancel" | ||||
@@ -1,7 +1,7 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
android:layout_width="@dimen/dp_660" | |||||
android:layout_height="wrap_content" | |||||
android:layout_width="@dimen/dp_740" | |||||
android:layout_height="@dimen/dp_1100" | |||||
xmlns:app="http://schemas.android.com/apk/res-auto" | xmlns:app="http://schemas.android.com/apk/res-auto" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
android:background="@drawable/bg_round25_white"> | android:background="@drawable/bg_round25_white"> | ||||
@@ -32,26 +32,27 @@ | |||||
<Spinner | <Spinner | ||||
android:id="@+id/spinner_list" | android:id="@+id/spinner_list" | ||||
style="@style/commonSpinnerStyle" | style="@style/commonSpinnerStyle" | ||||
android:layout_width="@dimen/dp_460" | |||||
android:layout_width="0dp" | |||||
android:layout_height="@dimen/dp_90" | android:layout_height="@dimen/dp_90" | ||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
app:layout_constraintLeft_toRightOf="@id/desc1" | app:layout_constraintLeft_toRightOf="@id/desc1" | ||||
app:layout_constraintTop_toTopOf="@id/desc1" | app:layout_constraintTop_toTopOf="@id/desc1" | ||||
android:layout_marginLeft="@dimen/dp_10" | |||||
app:layout_constraintRight_toRightOf="parent" | |||||
android:layout_marginEnd="@dimen/dp_20" | |||||
android:layout_marginStart="@dimen/dp_20" | |||||
/> | /> | ||||
<ListView | <ListView | ||||
android:id="@+id/list_attribute" | android:id="@+id/list_attribute" | ||||
android:layout_width="@dimen/dp_620" | |||||
android:layout_height="wrap_content" | |||||
app:layout_constraintTop_toBottomOf="@id/desc1" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="0dp" | |||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintBottom_toTopOf="@id/btn_last2" | |||||
app:layout_constraintTop_toBottomOf="@id/spinner_list" | |||||
android:layout_margin="@dimen/dp_20" | android:layout_margin="@dimen/dp_20" | ||||
android:divider="#00000000" | android:divider="#00000000" | ||||
tools:layout_height="300dp" | |||||
android:orientation="vertical" | android:orientation="vertical" | ||||
android:layout_marginBottom="@dimen/dp_100" | |||||
/> | /> | ||||
<TextView | <TextView | ||||
@@ -65,7 +66,7 @@ | |||||
android:layout_marginBottom="@dimen/dp_20" | android:layout_marginBottom="@dimen/dp_20" | ||||
android:layout_marginTop="@dimen/dp_30" | android:layout_marginTop="@dimen/dp_30" | ||||
android:textColor="@color/blue" | android:textColor="@color/blue" | ||||
android:text="存在选中组合" | |||||
tools:text="存在选中组合" | |||||
android:gravity="center" | android:gravity="center" | ||||
/> | /> | ||||
@@ -73,10 +74,9 @@ | |||||
android:id="@+id/btn_next2" | android:id="@+id/btn_next2" | ||||
android:layout_width="@dimen/dp_155" | android:layout_width="@dimen/dp_155" | ||||
android:layout_height="@dimen/dp_80" | android:layout_height="@dimen/dp_80" | ||||
app:layout_constraintTop_toBottomOf="@id/list_attribute" | |||||
app:layout_constraintLeft_toLeftOf="parent" | |||||
app:layout_constraintRight_toRightOf="parent" | |||||
app:layout_constraintBottom_toBottomOf="parent" | app:layout_constraintBottom_toBottomOf="parent" | ||||
android:layout_marginLeft="@dimen/dp_480" | |||||
android:layout_marginEnd="@dimen/dp_20" | |||||
android:layout_marginBottom="@dimen/dp_20" | android:layout_marginBottom="@dimen/dp_20" | ||||
android:layout_marginTop="@dimen/dp_30" | android:layout_marginTop="@dimen/dp_30" | ||||
style="@style/TextView_btn_dialog" | style="@style/TextView_btn_dialog" | ||||
@@ -88,7 +88,6 @@ | |||||
android:layout_width="@dimen/dp_155" | android:layout_width="@dimen/dp_155" | ||||
android:layout_height="@dimen/dp_80" | android:layout_height="@dimen/dp_80" | ||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintTop_toBottomOf="@id/list_attribute" | |||||
app:layout_constraintBottom_toBottomOf="parent" | app:layout_constraintBottom_toBottomOf="parent" | ||||
android:layout_marginLeft="@dimen/dp_20" | android:layout_marginLeft="@dimen/dp_20" | ||||
android:layout_marginTop="@dimen/dp_30" | android:layout_marginTop="@dimen/dp_30" | ||||
@@ -12,6 +12,8 @@ | |||||
android:layout_height="@dimen/dp_90" | android:layout_height="@dimen/dp_90" | ||||
style="@style/TextView_desc" | style="@style/TextView_desc" | ||||
tools:text="口味:" | tools:text="口味:" | ||||
android:maxLength="10" | |||||
android:ellipsize="middle" | |||||
/> | /> | ||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||