Commit 280a52f8 authored by Michalis Masikos's avatar Michalis Masikos

studentcard merchant app for android

parent 689180b6
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="gr.grnet.academicid.merchant"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="16"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<application android:label="@string/app_name"
android:name=".MerchantApplication"
android:icon="@drawable/ic_launcher"
android:allowBackup="true">
<activity android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".OfferList"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name=".SingleOffer"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateHidden"/>
<activity android:name=".ScanQR"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name="com.dm.zbar.android.scanner.ZBarScannerActivity"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name=".Preferences"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize"/>
<activity android:name=".ChangePassword"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateHidden"/>
</application>
</manifest>
/*___Generated_by_IDEA___*/
package gr.grnet.academicid.merchant;
/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
public final class BuildConfig {
public final static boolean DEBUG = Boolean.parseBoolean(null);
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package gr.grnet.academicid.merchant;
/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
public final class Manifest {
}
\ No newline at end of file
/*___Generated_by_IDEA___*/
package gr.grnet.academicid.merchant;
/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
public final class R {
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="50dp"
android:text="@string/lbl_current_password"/>
<EditText
android:id="@+id/etxt_current_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:contentDescription="@null"
android:inputType="textPassword"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="50dp"
android:text="@string/lbl_new_password"/>
<EditText
android:id="@+id/etxt_new_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:contentDescription="@null"
android:inputType="textPassword"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="50dp"
android:text="@string/lbl_new_password_confirmation"/>
<EditText
android:id="@+id/etxt_new_password_confirmation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:contentDescription="@null"
android:inputType="textPassword"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="30dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">
<Button
android:id="@+id/btn_cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginRight="3dp"
android:text="@string/lbl_cancel"
android:onClick="cancel"/>
<Button
android:id="@+id/btn_confirm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="3dp"
android:text="@string/lbl_confirm"
android:onClick="confirm"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:contentDescription="@null"
android:src="@drawable/ic_launcher"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="50dp"
android:text="@string/lbl_username"/>
<EditText
android:id="@+id/etxt_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:inputType="text|textNoSuggestions"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="3dp"
android:layout_marginLeft="50dp"
android:text="@string/lbl_password"/>
<EditText
android:id="@+id/etxt_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:inputType="textPassword"/>
<Button
android:id="@+id/btn_sign_in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="@string/lbl_sign_in"
android:onClick="signIn"/>
</LinearLayout>
</ScrollView>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/txt_offers_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:textAppearance="@style/header_green"
android:text="@string/lbl_active_offers"
/>
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:paddingTop="10dp"
android:textAppearance="@style/title_smart"
android:text="@string/lbl_no_offers"/>
</LinearLayout>
\ No newline at end of file
<?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="wrap_content"
android:orientation="vertical"
android:padding="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<!-- Title Label -->
<TextView
android:id="@+id/txtv_offer_item_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:paddingTop="6dp"
android:textAppearance="@style/list_title"/>
<!-- Description label -->
<TextView
android:id="@+id/txtv_offer_item_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:textAppearance="@style/list_item"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- Title Label -->
<TextView android:id="@+id/txtv_offer_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:textSize="25sp"
android:textStyle="bold"
android:textColor="#43bd00"/>
<!-- Description Label -->
<TextView android:id="@+id/txtv_offer_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#acacac"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingTop="20dp"
android:paddingBottom="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/list_title"
android:paddingRight="5dp"
android:text="@string/lbl_available_from"/>
<TextView
android:id="@+id/txtv_offer_startDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dp"
android:paddingLeft="5dp"
android:textAppearance="@style/list_title"
android:text="@string/lbl_available_to"/>
<TextView
android:id="@+id/txtv_offer_endDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/list_title"
android:text="@string/lbl_eligible_to"/>
<TextView
android:id="@+id/txtv_offer_criteria"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/txtv_offer_inspectionResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginTop="50dp"
android:visibility="gone"/>
<TextView
android:id="@+id/txtv_offer_inspectionResultError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
</LinearLayout>
</ScrollView>
<Button
android:id="@+id/btn_scan_qr"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/lbl_scan_qr"
android:onClick="scanQR"/>
<RelativeLayout
android:id="@+id/rellay_serial_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
<ImageButton
android:id="@+id/btn_check_serial"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:contentDescription="@null"
android:src="@drawable/action_search"
android:onClick="checkSerialNo"/>
<EditText
android:id="@+id/etxt_serial_number"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toLeftOf="@id/btn_check_serial"
android:layout_toRightOf="@+id/btn_clear_serial"
android:layout_alignBottom="@id/btn_check_serial"
android:layout_marginTop="4dp"
android:imeOptions="actionDone"
android:inputType="number"
android:maxLength="12"
android:hint="@string/lbl_enter_serial"/>
<ImageButton
android:id="@+id/btn_clear_serial"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:contentDescription="@null"
android:src="@drawable/content_remove"
android:onClick="clearContent"/>
</RelativeLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_toggle_offers"
android:icon="@drawable/rating_not_important"
android:title="@string/lbl_inactive_offers"/>
<item
android:id="@+id/menu_settings"
android:icon="@drawable/action_settings"
android:title="@string/menu_settings"/>
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_settings"
android:icon="@drawable/action_settings"
android:title="@string/menu_settings"/>
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_offers"
android:icon="@drawable/rating_important"
android:title="@string/menu_offers"/>
<item
android:id="@+id/menu_settings"
android:icon="@drawable/action_settings"
android:title="@string/menu_settings"/>
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Academic ID Merchant</string>
<string name="lbl_username">Όνομα Χρήστη:</string>
<string name="lbl_password">Κωδικός Πρόσβασης:</string>
<string name="lbl_sign_in">Είσοδος</string>
<string name="title_no_net_available">Δίκτυο μη Διαθέσιμο</string>
<string name="msg_no_net_available">Για ενεργοποίηση πιέστε Επόμενο</string>
<string name="action_next">Επόμενο</string>
<string name="action_close">Τερματισμός</string>
<string name="msg_wait">Παρακαλώ περιμένετε…</string>
<string name="msg_incorrect_credentials">Το όνομα Χρήστη ή ο Κωδικός Πρόσβασης είναι εσφαλμένα</string>
<string name="msg_no_camera_available">Η κάμερα δεν είναι διαθέσιμη</string>
<string name="lbl_active_offers">Ενεργές Προσφορές</string>
<string name="lbl_inactive_offers">Ανενεργές Προσφορές</string>
<string name="lbl_no_offers">Δεν υπάρχουν διαθεσιμες προσφορές</string>
<string name="msg_error_retrieving_offers">Παρουσιάστηκε σφάλμα κατά την ανάκτηση των διαθέσιμων προσφορών</string>
<string name="lbl_available_from">Διαθέσιμη από:</string>
<string name="lbl_available_to">Έως:</string>
<string name="lbl_eligible_to">Δικαιούχοι:</string>
<string name="msg_eligible_for_offer">Αριθμός ακαδημαικής ταυτότητας: SERIAL_TAG\nΟ κάτοχος δικαιούται την προσφορά</string>
<string name="msg_not_eligible_for_offer">Αριθμός ακαδημαικής ταυτότητας: SERIAL_TAG\nΟ κάτοχος δεν δικαιούταιτην προσφορά</string>
<string name="msg_invalid_input">Το στοιχείο εισόδου δεν αντιστοιχεί σε έγκυρη ακαδημαϊκή ταυτότητα</string>
<string name="msg_error_validating_offer">Παρουσιάστηκε σφάλμα κατά τον έλεγχο της διαθεσιμότητας της προσφοράς</string>
<string name="lbl_scan_qr">Σάρωση QR</string>
<string name="lbl_enter_serial">Εισαγωγή Σειριακού Αρ.</string>
<string name="lbl_exit">Πιέστε ξανά για έξοδο</string>
<string name="menu_offers">Ενεργές Προσφορές</string>
<string name="menu_settings">Ρυθμίσεις</string>
<string name="title_change_password">Αλλαγή Κωδικού Πρόσβασης</string>
<string name="msg_change_password">Αλλαγή του κωδικού πρόσβασης του χρήστη</string>
<string name="lbl_current_password">Τρέχων Κωδικός Πρόσβασης:</string>
<string name="lbl_new_password">Νέος Κωδικός Πρόσβασης:</string>
<string name="lbl_new_password_confirmation">Επιβεβαίωση Νέου Κωδικού:</string>
<string name="lbl_cancel">Ακύρωση</string>
<string name="lbl_confirm">Επιβεβαίωση</string>
<string name="msg_password_change_required">Απαιτείται αλλαγή του κωδικού πρόσβασης</string>
<string name="msg_incorrect_current_password">Ο τρέχων κωδικός πρόσβασης είναι λάθος</string>
<string name="msg_new_passwords_dont_match">Οι νέοι κωδικοί πρόσβασης δεν είναι ίδιοι</string>
<string name="msg_password_too_short">Ο κωδικός πρόσβασης πρέπει να περιέχει τουλάχιστον 4 χαρακτήρες</string>
<string name="msg_new_current_password_same">Ο νέος και ο τρέχον κωδικός πρόσβασης δεν πρέπει να είναι ίδιοι</string>
<string name="msg_error_changing_password">Παρουσιάστηκε σφάλμα κατα την διαδικασία αποθήκευσης του νέου κωδικού πρόσβασης</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Academic ID Merchant</string>
<string name="lbl_username">Username:</string>
<string name="lbl_password">Password:</string>
<string name="lbl_sign_in">Sign In</string>
<string name="title_no_net_available">No Network Connection</string>
<string name="msg_no_net_available">To enable network connection touch Next</string>
<string name="action_next">Next</string>
<string name="action_close">Close</string>
<string name="msg_wait">Please wait…</string>
<string name="msg_incorrect_credentials">Incorrect username or password</string>
<string name="msg_no_camera_available">Rear Facing Camera Unavailable</string>
<string name="lbl_active_offers">Active Offers</string>
<string name="lbl_inactive_offers">Inactive Offers</string>
<string name="lbl_no_offers">No Available Offers</string>
<string name="msg_error_retrieving_offers">Error trying to retrieve available offers</string>
<string name="lbl_available_from">Available from:</string>
<string name="lbl_available_to">To:</string>
<string name="lbl_eligible_to">Eligible to:</string>
<string name="msg_eligible_for_offer">Academic Id: SERIAL_TAG\nEligible for this offer</string>
<string name="msg_not_eligible_for_offer">Academic Id: SERIAL_TAG\nNot eligible for this offer</string>
<string name="msg_invalid_input">The input is not a valid academic ID</string>
<string name="msg_error_validating_offer">Error trying to validate offer</string>
<string name="lbl_scan_qr">Scan QR Code</string>
<string name="lbl_enter_serial">Enter Serial Number</string>
<string name="lbl_exit">Press again to exit</string>
<string name="menu_offers">Active Offers</string>
<string name="menu_settings">Settings</string>
<string name="title_change_password">Change Password</string>
<string name="msg_change_password">Change the user password</string>
<string name="lbl_current_password">Current Password:</string>
<string name="lbl_new_password">New Password:</string>
<string name="lbl_new_password_confirmation">Confirm New Password:</string>
<string name="lbl_cancel">Cancel</string>
<string name="lbl_confirm">Confirm</string>
<string name="msg_password_change_required">Required password change</string>
<string name="msg_incorrect_current_password">Current password is incorrect</string>
<string name="msg_new_passwords_dont_match">The new passwords don\'t match</string>
<string name="msg_password_too_short">Password must contain at least 4 characters</string>
<string name="msg_new_current_password_same">New and current password should not be the same</string>
<string name="msg_error_changing_password">Error trying to update user password</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="header_green">
<item name="android:textSize">30sp</item>
<item name="android:textColor">#00ff00</item>
<item name="android:textStyle">bold</item>
<item name="android:singleLine">true</item>
</style>
<style name="header_orange">
<item name="android:textSize">30sp</item>
<item name="android:textColor">#ee7620</item>
<item name="android:textStyle">bold</item>
<item name="android:singleLine">true</item>
</style>