@@ -122,15 +122,15 @@ public class wlgl_activity extends AppCompatActivity implements View.OnClickList | |||||
String name= edittext.getText().toString(); | String name= edittext.getText().toString(); | ||||
if(name.isEmpty()){ | if(name.isEmpty()){ | ||||
T.show(this, "物料名称不能为空!"); | T.show(this, "物料名称不能为空!"); | ||||
return; | |||||
} | } | ||||
if(QueryDB.GetMaterialIs(name)){ | if(QueryDB.GetMaterialIs(name)){ | ||||
T.show(this, "物料名称重复,请重新输入后重试!"); | T.show(this, "物料名称重复,请重新输入后重试!"); | ||||
return; | |||||
} | } | ||||
BPA_MATERIAL bpa_material=new BPA_MATERIAL(); | BPA_MATERIAL bpa_material=new BPA_MATERIAL(); | ||||
bpa_material.name=name; | bpa_material.name=name; | ||||
bpa_material.imgUrl=""; | bpa_material.imgUrl=""; | ||||
bpa_material.deviceID= ConfigName.getInstance().DeviceId; | bpa_material.deviceID= ConfigName.getInstance().DeviceId; | ||||
bpa_material.userID=ConfigName.getInstance().user.userID; | bpa_material.userID=ConfigName.getInstance().user.userID; | ||||
QueryDB.AddMaterial(bpa_material); | QueryDB.AddMaterial(bpa_material); | ||||
@@ -3,10 +3,10 @@ | |||||
xmlns:android="http://schemas.android.com/apk/res/android" | xmlns:android="http://schemas.android.com/apk/res/android" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="10dp" | |||||
android:layout_marginBottom="10dp"> | |||||
android:background="@mipmap/dpbj" | |||||
android:orientation="horizontal"> | |||||
<TableLayout | <TableLayout | ||||
android:background="@mipmap/bgxz" | |||||
android:layout_marginTop="10dp" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:gravity="center" | android:gravity="center" | ||||
@@ -39,11 +39,10 @@ | |||||
android:text="删除" | android:text="删除" | ||||
android:background="@drawable/btn_button" | android:background="@drawable/btn_button" | ||||
android:textSize="@dimen/textSize" | android:textSize="@dimen/textSize" | ||||
android:textColor="@color/white" | |||||
android:textColor="@color/foreground" | |||||
android:layout_marginLeft="20dp" | android:layout_marginLeft="20dp" | ||||
android:layout_width="60dp" | android:layout_width="60dp" | ||||
android:layout_height="26dp" | android:layout_height="26dp" | ||||
/> | /> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -114,7 +114,7 @@ | |||||
android:text="新增" | android:text="新增" | ||||
android:background="@drawable/btn_button" | android:background="@drawable/btn_button" | ||||
android:textSize="@dimen/textSize" | android:textSize="@dimen/textSize" | ||||
android:textColor="@color/white" | |||||
android:textColor="@color/foreground" | |||||
android:layout_marginLeft="5dp" | android:layout_marginLeft="5dp" | ||||
android:layout_gravity="center" | android:layout_gravity="center" | ||||
android:layout_width="60dp" | android:layout_width="60dp" | ||||
@@ -146,6 +146,7 @@ | |||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:background="#FF03668F" /> | android:background="#FF03668F" /> | ||||
<TableLayout | <TableLayout | ||||
android:layout_centerVertical="true" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:gravity="center" | android:gravity="center" | ||||
@@ -191,7 +192,12 @@ | |||||
<ListView | <ListView | ||||
android:id="@+id/datatab" | android:id="@+id/datatab" | ||||
android:layout_width="match_parent" | 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> | </RelativeLayout> | ||||
</LinearLayout> | </LinearLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||