소스 검색

工厂调入 修正

姜永辉 5 달 전
부모
커밋
789ed13151
2개의 변경된 파일27개의 추가작업 그리고 21개의 파일을 삭제
  1. 5 5
      res/layout/activity_factory_transfer_in.xml
  2. 22 16
      src/com/jiaju/activity/FactoryTransferInActivity.java

+ 5 - 5
res/layout/activity_factory_transfer_in.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/parentRel"
+    android:id="@+id/parentRelF"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/background" >
@@ -19,7 +19,7 @@
         android:orientation="horizontal" >
 
         <Button
-            android:id="@+id/btnSave"
+            android:id="@+id/btnSaveFT"
             android:layout_width="0dp"
             android:layout_height="50dp"
             android:layout_weight="1"
@@ -80,7 +80,7 @@
                         android:orientation="vertical" >
 
                         <TextView
-                            android:id="@+id/procedureTv"
+                            android:id="@+id/procedureTvFt"
                             android:layout_width="150dp"
                             android:layout_height="wrap_content"
                             android:layout_gravity="center_vertical"
@@ -175,7 +175,7 @@
                         android:orientation="vertical" >
 
                         <EditText
-                            android:id="@+id/barcodeEdt"
+                            android:id="@+id/barcodeEdtt"
                             android:layout_width="fill_parent"
                             android:layout_height="wrap_content"
                             android:layout_marginRight="10dp"
@@ -262,7 +262,7 @@
                     android:visibility="visible" >
 
                     <ListView
-                        android:id="@+id/message_listview"
+                        android:id="@+id/message_listview_ft"
                         android:layout_width="fill_parent"
                         android:layout_height="wrap_content"
                         android:cacheColorHint="#00000000"

+ 22 - 16
src/com/jiaju/activity/FactoryTransferInActivity.java

@@ -100,8 +100,7 @@ public class FactoryTransferInActivity extends Activity {
 	private Handler barcodeUpperH = new Handler();
 	private FactoryTransferInListMessageAdapter adapter;
 	private boolean isCancel = false;
-	private boolean isFirst = true;
-	private String IsSYNCSTATUS = "0";
+	private boolean isFirst = true; 
 	private int Height = 188;
 	private String DATAKEY = "";
 
@@ -118,10 +117,7 @@ public class FactoryTransferInActivity extends Activity {
 		sessionkey = preferences.getString("SessionKey", "");
 		barcodeList = new ArrayList<BarcodeInfo>(); 
 		initView(); 
-		IsSYNCSTATUS = this.getIntent().getStringExtra("SYNCSTATUS");
-		if (IsSYNCSTATUS == null || IsSYNCSTATUS.equals("")) {
-			IsSYNCSTATUS = "0";
-		}
+		 
 		 
 		procedureTv.setText(send_userCode);  
 		allListeners();
@@ -132,6 +128,20 @@ public class FactoryTransferInActivity extends Activity {
 		SendOutRunnable glazeRunnable = new SendOutRunnable(obj);
 		mHandler.post(glazeRunnable); 
 		updateDataKey();
+		barcodeEdt.setEnabled(true);
+		barcodeEdt.setText("");
+		barcodeEdt.setFocusable(true);
+		barcodeEdt.setFocusableInTouchMode(true);
+		barcodeEdt.requestFocus();
+		barcodeEdt.findFocus();
+		barcodeEdt.setFilters(new InputFilter[] { new InputFilter() {
+			@Override
+			public CharSequence filter(CharSequence source, int start, int end, Spanned dest,
+					int dstart, int dend) {
+
+				return null;
+			}
+		} });
 	}
 
 	/** ¸üÐÂΨһ±êʶ */
@@ -475,18 +485,18 @@ public class FactoryTransferInActivity extends Activity {
 		backbtn = (ImageButton) findViewById(R.id.left_img);
 		backtext = (TextView) findViewById(R.id.back);
 		title.setText("¹¤³§µ÷Èë");
-		procedureTv = (TextView) findViewById(R.id.procedureTv);
+		procedureTv = (TextView) findViewById(R.id.procedureTvFt);
 		procedureTv.setMovementMethod(ScrollingMovementMethod.getInstance());
 
 		procedureTv.setEllipsize(TextUtils.TruncateAt.MARQUEE);
 		procedureTv.setMarqueeRepeatLimit(6);
-		mRootView = findViewById(R.id.parentRel);
-		barcodeEdt = (EditText) findViewById(R.id.barcodeEdt);
+		mRootView = findViewById(R.id.parentRelF);
+		barcodeEdt = (EditText) findViewById(R.id.barcodeEdtt);
 		barcodeEdt.setRawInputType(InputType.TYPE_CLASS_NUMBER);
 		CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 		descEdt = (EditText) findViewById(R.id.descEdt);
-		messageLst = (ListView) findViewById(R.id.message_listview);
-		saveBtn = (Button) findViewById(R.id.btnSave);
+		messageLst = (ListView) findViewById(R.id.message_listview_ft);
+		saveBtn = (Button) findViewById(R.id.btnSaveFT);
 		sendOutSpinner = (Spinner) findViewById(R.id.fatory_transfer_in); 
 	}
  
@@ -977,11 +987,7 @@ public class FactoryTransferInActivity extends Activity {
 								return null;
 							}
 						} });
-						if (IsSYNCSTATUS.equals("1")) {
-							barcodeEdt.setEnabled(false);
-							saveBtn.setEnabled(false);
-							// sendOutSpinner.setSpinnerMode(DialogFragment.MODE_DIALOG);
-						}
+						
 						CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 						// InputMethodManager im = (InputMethodManager) barcodeEdt
 						// .getContext().getSystemService(