+++ /dev/null
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.jaiswallab.lab.inventory"
- android:versionCode="1"
- android:versionName="1.0" >
-
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
- <uses-permission android:name="android.permission.READ_CALENDAR"/>
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-
- <uses-sdk android:targetSdkVersion="18" android:minSdkVersion="8"/>
- <uses-permission android:name="android.permission.INTERNET"/>
-
- <application
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/AppTheme" >
- <activity
- android:name=".MainActivity"
- android:label="@string/title_activity_main" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-
-
-</manifest>
\ No newline at end of file
+++ /dev/null
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.jaiswallab.lab.inventory"
- android:versionCode="1"
- android:versionName="1.0" >
-
- <uses-sdk
- android:minSdkVersion="8"
- android:targetSdkVersion="18" />
-
- <application
- android:icon="@drawable/ic_launcher"
- android:label="@string/app_name"
- android:theme="@style/AppTheme" >
- <activity
- android:name=".MainActivity"
- android:label="@string/title_activity_main" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-
-</manifest>
\ No newline at end of file
+++ /dev/null
-# cache for current jar dependency. DO NOT EDIT.
-# format is <lastModified> <length> <SHA-1> <path>
-# Encoding is UTF-8
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/green_button"></item>
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/grey_button"></item>
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/green_button"></item>
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/grey_button"></item>
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/green_button"></item>
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/grey_button"></item>
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/green_button"></item>
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+<item android:drawable="@drawable/grey_button"></item>
+</selector>
\ No newline at end of file
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
- android:background="@color/light_green"
+ android:layout_height="match_parent"
+ android:background="@color/light_blue" >
<EditText
android:id="@+id/editText2"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/editText1"
- android:ems="10"
- android:text="Data 2" />
+ android:ems="10" />
<EditText
android:id="@+id/editText3"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/editText2"
- android:ems="10"
- android:text="Data 3" />
-
- <Button
- android:id="@+id/button1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:onClick="recognizeQRClick"
- android:text="@string/recognize_qr_button" />
+ android:ems="10" />
<EditText
android:id="@+id/editText1"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/button2"
- android:ems="10"
- android:text="Data 1" />
+ android:ems="10" />
<Button
android:id="@+id/button2"
android:layout_below="@+id/button1"
android:layout_toLeftOf="@+id/editText2"
android:onClick="updateInventoryItem"
+ android:background="@drawable/update_button"
android:text="Update Item" />
<EditText
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/editText3"
- android:ems="10"
- android:text="Data 4" >
-
- <requestFocus />
- </EditText>
+ android:ems="10" />
<EditText
android:id="@+id/editText5"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/editText4"
- android:ems="10"
- android:text="Data 5" />
+ android:ems="10" />
<Button
android:id="@+id/button3"
android:layout_height="wrap_content"
android:layout_above="@+id/editText5"
android:layout_alignLeft="@+id/TextView04"
- android:text="Shelf:"
+ android:text="Freezer:"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/editText5"
android:layout_alignLeft="@+id/TextView03"
- android:text="Freezer:"
+ android:text="Shelf:"
android:textAppearance="?android:attr/textAppearanceSmall" />
+ <Button
+ android:id="@+id/button1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_marginRight="10dp"
+ android:layout_marginTop="10dp"
+ android:background="@drawable/green_button"
+ android:onClick="recognizeQRClick"
+ android:text="@string/recognize_qr_button" />
+
</RelativeLayout>
\ No newline at end of file
<string name="title_activity_main">Lab Inventory</string>
<string name="qr_button">Start QR code scanner</string>
<string name="inventory_button">Check inventory</string>
- <string name="recognize_qr_button">Recognize QR</string>
+ <string name="recognize_qr_button">New Scan</string>
<string name="print_qr_button">Print new QR</string>
- <color name="light_green">#FF89EC6A</color>
+ <color name="light_green">#9962B1D0</color>
+ <color name="light_blue">#FF4282D3</color>
</resources>
\ No newline at end of file
import android.webkit.WebView;
import android.widget.EditText;
-
-
-
public class MainActivity extends Activity {
boolean printingNewQR = false;
public void recognizeQRClick(View view) throws CloneNotSupportedException {
printingNewQR = false;
recognizingQR = true;
- text1.setText("Recognize QR button clicked");
IntentIntegrator intentIntegrator = new IntentIntegrator(this);
intentIntegrator.initiateScan();
params = params + "&room=" + text2.getText();
}
if((text3.getText() != null) && (!text3.getText().equals(""))) {
- params = params + "&shelf=" + text3.getText();
+ params = params + "&cupboard=" + text3.getText();
}
if((text4.getText() != null) && (!text4.getText().equals(""))) {
params = params + "&freezer=" + text4.getText();
}
if((text5.getText() != null) && (!text5.getText().equals(""))) {
- params = params + "&cupboard=" + text5.getText();
+ params = params + "&shelf=" + text5.getText();
}