Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

should get stocking and containers in soon...

  • Loading branch information...
commit 460895f44d80b68465332bb35b89ab6c5975d904 1 parent 66c5f5a
@Kagetsuki authored
View
13 res/layout/rack_list_item.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <ExpandableListView
+ android:id="@+id/expandableListView1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+ </ExpandableListView>
+
+</LinearLayout>
View
13 res/layout/racks.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
+
+ <ListView
+ android:id="@+id/rackList"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+ </ListView>
+
+</LinearLayout>
View
169 res/layout/stocking.xml
@@ -1,42 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/ScrollView"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/supplier_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/supplier"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <EditText
- android:id="@+id/supplier_text"
+ android:layout_height="match_parent" >
+
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10" >
+ android:layout_height="match_parent"
+ android:orientation="vertical" >
- <requestFocus />
- </EditText>
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
- <TextView
- android:id="@+id/order_number_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/order_number"
- android:textAppearance="?android:attr/textAppearanceMedium" />
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="0.82"
+ android:orientation="vertical" >
- <EditText
- android:id="@+id/order_number_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:ems="10" />
+ <TextView
+ android:id="@+id/supplier_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/supplier"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
- <Button
- android:id="@+id/scan_stocking_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/scan_stocking" />
+ <EditText
+ android:id="@+id/supplier_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ems="10" />
+
+ <TextView
+ android:id="@+id/order_number_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/order_number"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <EditText
+ android:id="@+id/order_number_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ems="10" >
+
+ <requestFocus />
+ </EditText>
+ </LinearLayout>
+
+ <ImageButton
+ android:id="@+id/scan_stocking_button"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:src="@drawable/scanicon_sm" />
+ </LinearLayout>
+
+ <ImageView
+ android:id="@+id/imageView1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:scaleType="fitXY"
+ android:src="@drawable/hr" />
+
+ <TextView
+ android:id="@+id/target_container_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/target_container"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <Spinner
+ android:id="@+id/target_container_spinner"
+ android:layout_width="227dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1.96" />
+
+ <Button
+ android:id="@+id/button1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/select" />
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/textView1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/product_name"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <Spinner
+ android:id="@+id/spinner1"
+ android:layout_width="226dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="2.55" />
+
+ <Button
+ android:id="@+id/button2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/select" />
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/textView2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/count"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <EditText
+ android:id="@+id/editText1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:ems="10"
+ android:inputType="number" />
+
+ <Button
+ android:id="@+id/button3"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/stock_in" />
+ </LinearLayout>
+
+ </LinearLayout>
-</LinearLayout>
+</ScrollView>
View
3  res/values-ja/strings.xml
@@ -85,6 +85,9 @@
<string name="serverside_developer">サーバ側開発</string>
<string name="camplight">CampLight Ltd.</string>
<string name="camplight_url">http://camplight.net</string>
+ <string name="target_container">入荷先コンテナ</string>
+ <string name="select">選択</string>
+ <string name="count">数</string>
<!-- alert content -->
View
4 res/values/strings.xml
@@ -86,6 +86,9 @@
<string name="serverside_developer">Serverside Development</string>
<string name="camplight">CampLight Ltd.</string>
<string name="camplight_url">http://camplight.net</string>
+ <string name="target_container">Target Container</string>
+ <string name="select">Select</string>
+ <string name="count">Count</string>
<!-- alert content -->
<string name="unregistered_barcode_title">Unregistered Barcode</string>
@@ -99,4 +102,5 @@
<string name="saving">Saving</string>
<string name="deleting">Deleting</string>
+
</resources>
View
57 src/org/genshin/spree/RepetitiveScanner.java
@@ -0,0 +1,57 @@
+package org.genshin.spree;
+
+import org.genshin.warehouse.Warehouse.ResultCodes;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+
+public class RepetitiveScanner extends Activity {
+ public static enum RepetitiveScanCodes {ERROR, STANDBY, START, CONTINUE, FINISH};
+ private int status;
+ private Intent intent;
+
+ RepetitiveScanner() {
+ intent = new Intent("com.google.zxing.client.android.SCAN");
+ intent.putExtra("DEFAULT_BYTE_MODE_ENCODING", "UTF-8");
+ status = RepetitiveScanCodes.STANDBY.ordinal();
+ }
+
+ public void beforeScanning() {
+ status = RepetitiveScanCodes.CONTINUE.ordinal();
+ }
+
+ public void onScanResult(Intent intent, String format, String contents) {
+
+ }
+
+ private void finishScanning() {
+
+ }
+
+ public void start() {
+ status = RepetitiveScanCodes.START.ordinal();
+ beforeScanning();
+
+
+ }
+
+ private void continueScanning() {
+ startActivityForResult(intent, ResultCodes.SCAN.ordinal());
+ }
+
+ public void onActivityResult(int requestCode, int resultCode, Intent intent) {
+ if (requestCode == 0) {
+ if (resultCode == RESULT_OK) {
+ onScanResult(intent, intent.getStringExtra("SCAN_RESULT_FORMAT"), intent.getStringExtra("SCAN_RESULT"));
+ if (status == RepetitiveScanCodes.CONTINUE.ordinal()) {
+ continueScanning();
+ } else if (status == RepetitiveScanCodes.FINISH.ordinal()) {
+ finishScanning();
+ }
+ } else if (resultCode == RESULT_CANCELED) {
+ finishScanning();
+ }
+ }
+ }
+}
View
14 src/org/genshin/warehouse/ScanSystem.java → src/org/genshin/spree/ScanSystem.java
@@ -1,17 +1,14 @@
-package org.genshin.warehouse;
+package org.genshin.spree;
+import org.genshin.warehouse.Warehouse.ResultCodes;
+
+import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.Toast;
import android.app.Activity;
-public class ScanSystem extends Activity implements View.OnClickListener {
- public void onClick(View v) {
- Toast.makeText(v.getContext(), "scan", Toast.LENGTH_LONG).show();
- Intent intent = new Intent("com.google.zxing.client.android.SCAN");
- intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
- startActivityForResult(intent, 0);
- }
+public class ScanSystem extends Activity {
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == 0) {
@@ -24,5 +21,4 @@ public void onActivityResult(int requestCode, int resultCode, Intent intent) {
}
}
}
-
}
View
5 src/org/genshin/warehouse/stocking/StockingMenuActivity.java
@@ -14,18 +14,19 @@
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
+import android.widget.ImageButton;
import android.widget.Toast;
public class StockingMenuActivity extends Activity {
private EditText supplierText;
private EditText orderNumberText;
- private Button stockingScanButton;
+ private ImageButton stockingScanButton;
private SpreeConnector spree;
private void initViewElements() {
supplierText = (EditText) findViewById(R.id.supplier_text);
orderNumberText = (EditText) findViewById(R.id.order_number_text);
- stockingScanButton = (Button) findViewById(R.id.scan_stocking_button);
+ stockingScanButton = (ImageButton) findViewById(R.id.scan_stocking_button);
}
private void hookupInterface() {
Please sign in to comment.
Something went wrong with that request. Please try again.