Browse Source

调整

master
liup 3 weeks ago
parent
commit
bdf6557322
8 changed files with 21 additions and 17 deletions
  1. +1
    -1
      app/src/main/java/com/jdzh/jdzhandroid/Business/TaskControl.java
  2. +1
    -1
      app/src/main/java/com/jdzh/jdzhandroid/UI/adapter/edit/RecipeAttribute2Adapter.java
  3. +3
    -4
      app/src/main/java/com/jdzh/jdzhandroid/UI/dialog/AttributeEditDialog.java
  4. +2
    -2
      app/src/main/java/com/jdzh/jdzhandroid/UI/dialog/CalibrationDataDialog.java
  5. +3
    -3
      app/src/main/res/layout/dialog/layout/dialog_recipe_edit.xml
  6. +7
    -4
      app/src/main/res/layout/dialog/layout/layout_recipeattribute_recycler.xml
  7. +3
    -1
      app/src/main/res/layout/dialog/layout/layout_recipeattribute_recycler2.xml
  8. +1
    -1
      app/src/main/res/layout/dialog/layout/layout_recipeattribute_value_recycler2.xml

+ 1
- 1
app/src/main/java/com/jdzh/jdzhandroid/Business/TaskControl.java View File

@@ -42,7 +42,7 @@ public class TaskControl {
*/
public static void startBatchList(String configId, RecipeExecuteDialog.ExecuteCallBack callBack){
if(Config.isTest){
callBack.onSuccess(8200);
callBack.onSuccess(3200);
return;
}
List<BPA_RecipeConfigDetail> detailList = SqliteHelper.get().queryByBuilder(BPA_RecipeConfigDetail.class,


+ 1
- 1
app/src/main/java/com/jdzh/jdzhandroid/UI/adapter/edit/RecipeAttribute2Adapter.java View File

@@ -78,7 +78,7 @@ public class RecipeAttribute2Adapter extends ArrayAdapter<BPA_Recipeattribute> {
}
int lines = datas.size()%4>0?(datas.size()/4+1):datas.size()/4;
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) binding.gvAttrValues.getLayoutParams();
layoutParams.height = (int)( (lines*binding.gvAttrValues.getContext().getResources().getDimension(R.dimen.dp50)+
layoutParams.height = (int)( (lines*binding.gvAttrValues.getContext().getResources().getDimension(R.dimen.dp60)+
(lines-1)*binding.gvAttrValues.getContext().getResources().getDimension(R.dimen.dp5))*DisplayManager.getWidthScaleRate());
binding.gvAttrValues.setLayoutParams(layoutParams);
if(valueAdapters.get(position)!=null){


+ 3
- 4
app/src/main/java/com/jdzh/jdzhandroid/UI/dialog/AttributeEditDialog.java View File

@@ -69,10 +69,9 @@ public class AttributeEditDialog extends Dialog {
bpaRecipeattribute.setSort(1);
}
recipeattributes.add(bpaRecipeattribute);
// adapter.getmDatas().add(bpaRecipeattribute);
//
// adapter.notifyDataSetChanged();
// binding.recRecipeAttribute.smoothScrollToPosition(adapter.getmDatas().size()-1);

SqliteHelper.get().insertMulti(recipeattributes);
SqliteHelper.get().insertMulti(adapter.getValues());

adapter = new AttributeEditAdapter(context, R.layout.layout_recipeattribute_recycler_edit,recipeattributes);
binding.recRecipeAttribute.setAdapter(adapter);


+ 2
- 2
app/src/main/java/com/jdzh/jdzhandroid/UI/dialog/CalibrationDataDialog.java View File

@@ -88,12 +88,12 @@ public class CalibrationDataDialog extends DialogFragment {
if (getDialog() != null) {
Window window = getDialog().getWindow();
assert window != null;
// fullScreen(window);
fullScreen(window);
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
WindowManager.LayoutParams params = window.getAttributes();
params.gravity = Gravity.CENTER;
params.width = ViewGroup.LayoutParams.MATCH_PARENT;
params.height = ViewGroup.LayoutParams.WRAP_CONTENT;
params.height = ViewGroup.LayoutParams.MATCH_PARENT;
window.setAttributes(params);
}
DisplayManager.scaleViewGroup(binding.getRoot());


+ 3
- 3
app/src/main/res/layout/dialog/layout/dialog_recipe_edit.xml View File

@@ -161,7 +161,7 @@
android:layout_weight="1.2"
android:background="@drawable/bg_recycle_stoke_gray"
android:orientation="vertical"
android:layout_marginEnd="10dp"
android:layout_marginEnd="0dp"
/>

<TextView
@@ -222,7 +222,7 @@
android:text="物料"
android:textColor="@color/black"
android:layout_weight="2"
android:textSize="@dimen/sp28"
android:textSize="@dimen/sp22"
android:layout_height="match_parent"/>
<View
android:layout_width="1dp"
@@ -230,7 +230,7 @@
android:background="@color/button_border"
/>
<TextView
android:textSize="@dimen/sp28"
android:textSize="@dimen/sp22"
android:layout_width="0dp"
android:gravity="center"
android:text="重量(g)"


+ 7
- 4
app/src/main/res/layout/dialog/layout/layout_recipeattribute_recycler.xml View File

@@ -3,15 +3,17 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:layout_marginBottom="@dimen/dp10"
android:layout_marginBottom="@dimen/dp20"
tools:layout_width="800dp"
android:orientation="horizontal">
<TextView
android:layout_width="120dp"
android:layout_width="200dp"
android:layout_height="70dp"
android:gravity="right|center"
tools:text="属性属性属性"
android:textSize="@dimen/sp24"
android:paddingEnd="15dp"
android:paddingStart="10dp"
android:id="@+id/tv_attribute_name"
android:textColor="@color/black"
/>
@@ -40,8 +42,9 @@
android:layout_height="wrap_content"
android:numColumns="auto_fit"
android:horizontalSpacing="15dp"
android:verticalSpacing="5dp"
android:columnWidth="@dimen/dp100"
android:verticalSpacing="10dp"
android:columnWidth="@dimen/dp80"
android:layout_marginEnd="10dp"
android:layout_marginBottom="@dimen/dp10"
android:stretchMode="columnWidth" />
</LinearLayout>

+ 3
- 1
app/src/main/res/layout/dialog/layout/layout_recipeattribute_recycler2.xml View File

@@ -7,9 +7,11 @@
android:orientation="horizontal">
<TextView
android:layout_width="120dp"
android:layout_height="40dp"
android:layout_height="50dp"
android:gravity="right|center"
tools:text="属性属性属性"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:textSize="@dimen/sp20"
android:id="@+id/tv_attribute_name"
android:textColor="@color/black"


+ 1
- 1
app/src/main/res/layout/dialog/layout/layout_recipeattribute_value_recycler2.xml View File

@@ -15,7 +15,7 @@
android:id="@+id/main"
android:layout_width="match_parent">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="40dp"
android:layout_height="50dp"
android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:paddingLeft="@dimen/dp2"


Loading…
Cancel
Save