forked from Genshin/SpreeWarehouseAndroid
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
should get stocking and containers in soon...
- Loading branch information
Showing
8 changed files
with
233 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,42 +1,143 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | <?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_width="match_parent" | ||
android:layout_height="match_parent" | android:layout_height="match_parent" > | ||
android:orientation="vertical" > |
|
||
|
<LinearLayout | ||
<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_width="match_parent" | android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | android:layout_height="match_parent" | ||
android:ems="10" > | android:orientation="vertical" > | ||
|
|
||
<requestFocus /> | <LinearLayout | ||
</EditText> | android:layout_width="match_parent" | ||
android:layout_height="wrap_content" > | |||
|
|
||
<TextView | <LinearLayout | ||
android:id="@+id/order_number_title" | android:layout_width="wrap_content" | ||
android:layout_width="wrap_content" | android:layout_height="wrap_content" | ||
android:layout_height="wrap_content" | android:layout_weight="0.82" | ||
android:text="@string/order_number" | android:orientation="vertical" > | ||
android:textAppearance="?android:attr/textAppearanceMedium" /> | |||
|
|
||
<EditText | <TextView | ||
android:id="@+id/order_number_text" | android:id="@+id/supplier_title" | ||
android:layout_width="match_parent" | android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||
android:ems="10" /> | android:text="@string/supplier" | ||
android:textAppearance="?android:attr/textAppearanceMedium" /> | |||
|
|
||
<Button | <EditText | ||
android:id="@+id/scan_stocking_button" | android:id="@+id/supplier_text" | ||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||
android:text="@string/scan_stocking" /> | 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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(); | |||
} | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters