Browse Source

tijiaoceshi2312312

master
fyf 1 year ago
parent
commit
4e59b672ff
3 changed files with 14 additions and 9 deletions
  1. +2
    -2
      app/src/main/java/com/example/bpa/view/from/wlgl_activity.java
  2. +4
    -5
      app/src/main/res/layout/datatab/layout/wl_item.xml
  3. +8
    -2
      app/src/main/res/layout/from/layout/activity_wlgl.xml

+ 2
- 2
app/src/main/java/com/example/bpa/view/from/wlgl_activity.java View File

@@ -122,15 +122,15 @@ public class wlgl_activity extends AppCompatActivity implements View.OnClickList
String name= edittext.getText().toString();
if(name.isEmpty()){
T.show(this, "物料名称不能为空!");
return;
}
if(QueryDB.GetMaterialIs(name)){
T.show(this, "物料名称重复,请重新输入后重试!");
return;
}

BPA_MATERIAL bpa_material=new BPA_MATERIAL();
bpa_material.name=name;
bpa_material.imgUrl="";

bpa_material.deviceID= ConfigName.getInstance().DeviceId;
bpa_material.userID=ConfigName.getInstance().user.userID;
QueryDB.AddMaterial(bpa_material);


+ 4
- 5
app/src/main/res/layout/datatab/layout/wl_item.xml View File

@@ -3,10 +3,10 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp">
android:background="@mipmap/dpbj"
android:orientation="horizontal">
<TableLayout
android:background="@mipmap/bgxz"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@@ -39,11 +39,10 @@
android:text="删除"
android:background="@drawable/btn_button"
android:textSize="@dimen/textSize"
android:textColor="@color/white"
android:textColor="@color/foreground"
android:layout_marginLeft="20dp"
android:layout_width="60dp"
android:layout_height="26dp"

/>
</RelativeLayout>



+ 8
- 2
app/src/main/res/layout/from/layout/activity_wlgl.xml View File

@@ -114,7 +114,7 @@
android:text="新增"
android:background="@drawable/btn_button"
android:textSize="@dimen/textSize"
android:textColor="@color/white"
android:textColor="@color/foreground"
android:layout_marginLeft="5dp"
android:layout_gravity="center"
android:layout_width="60dp"
@@ -146,6 +146,7 @@
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"
@@ -191,7 +192,12 @@
<ListView
android:id="@+id/datatab"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:divider="#00000000"
android:dividerHeight="14dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>


Loading…
Cancel
Save