<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
+ <uses-permission android:name="android.permission.READ_CALENDAR" />
+ <uses-permission android:name="android.permission.WRITE_CALENDAR" />
+
<application
android:icon="@drawable/evergreen_launcher_icon"
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/evergreen_1_256x256x32_grey"
- android:gravity="center"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<layer-list>
+ <item>
+ <shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle" >
+ <solid android:color="@color/background" />
+ </shape>
+ </item>
+ <item>
+ <bitmap
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:gravity="center"
+ android:src="@drawable/evergreen_1_256x256x32_grey" />
+ </item>
+</layer-list>
\ No newline at end of file
android:orientation="horizontal"
android:layout_below="@id/header"
android:layout_centerHorizontal="true"
+ android:background="@drawable/background_grey_image"
+ android:gravity="center"
>
- <ImageButton
+ <Button
android:id="@+id/menu_advanced_search_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/advanced_search" />
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/advanced_search"
+ android:text="@string/menu_advanced_search"
+
+ />
- <ImageButton
+ <Button
android:id="@+id/library_hours_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/library_hours" />
-
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/library_hours"
+ android:text="@string/menu_library_hours"
+ />
+
- <ImageButton
+ <Button
android:id="@+id/preference_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/preferences"
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/preferences"
+ android:text="@string/menu_preferences"
/>
- <ImageButton
+ <Button
android:id="@+id/barcode_scan_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/barcode_scan"/>
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/barcode_scan"
+ android:text="@string/menu_barcode_scan"
+ />
+
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:padding="4dip"
+ >
<include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
<LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginTop="2dip"
+ >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/search_result_text"
+ android:text="@string/checkout_item_txt"
/>
<TextView
- android:id="@+id/search_result_number"
+ android:id="@+id/checkout_items_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="left|center"
- android:paddingBottom="3dip"
- android:paddingTop="3dip"
- android:paddingLeft="3dip"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
android:orientation="vertical"
- android:gravity="center_vertical"
- android:paddingLeft="5dip"
- android:layout_alignParentLeft="true"
- >
-
-
-
- <TextView
- android:id="@+id/checkout_record_title"
- style="@style/TitleSearchStyleList"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
-
- <TextView
- android:id="@+id/checkout_record_author"
- style="@style/AuthorSearchStyleList"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"/>
-
-
- <TextView
- android:id="@+id/checkout_due_date"
- style="@style/PubSearchStyleList"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="due date"
- />
-
- </LinearLayout>
- <Button
- android:id="@+id/renew_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/renew_button"
- android:layout_gravity="right"
- android:layout_alignParentRight="true"
- />
-
-</RelativeLayout>
\ No newline at end of file
+ android:paddingBottom="3dip"
+ android:paddingLeft="3dip"
+ android:paddingTop="3dip" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:id="@+id/checkout_record_title"
+ style="@style/TitleSearchStyleList"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" />
+
+ <Button
+ android:id="@+id/renew_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/renew_button" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/checkout_record_author"
+ style="@style/AuthorSearchStyleList"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" />
+
+ <TextView
+ android:id="@+id/checkout_due_date"
+ style="@style/PubSearchStyleList"
+ android:layout_width="fill_parent"
+ android:gravity="left"
+ android:layout_height="wrap_content" />
+ </LinearLayout>
+
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/add_to_calendar"
+ />
+
+ <CheckBox
+ android:id="@+id/add_reminder_to_calendar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
android:layout_marginTop="5dip"
android:gravity="center"
android:orientation="vertical"
+ android:background="@drawable/background_grey_image"
+
>
<LinearLayout
android:gravity="center"
>
- <ImageButton
+ <Button
android:id="@+id/menu_advanced_search_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/advanced_search" />
-
- <ImageButton
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/advanced_search"
+ android:text="@string/menu_advanced_search"
+
+ />
+
+ <Button
android:id="@+id/library_hours_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/library_hours" />
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/library_hours"
+ android:text="@string/menu_library_hours"
+ />
</LinearLayout>
<LinearLayout
android:layout_height="wrap_content"
android:gravity="center" >
- <ImageButton
+ <Button
android:id="@+id/preference_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/preferences"
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/preferences"
+ android:text="@string/menu_preferences"
/>
- <ImageButton
+ <Button
android:id="@+id/barcode_scan_button"
style="@style/MenuListButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/barcode_scan"/>
+ android:layout_width="96dp"
+ android:layout_height="96dp"
+ android:background="@drawable/barcode_scan"
+ android:text="@string/menu_barcode_scan"
+ />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<resources>
+ <!-- Main menu button text -->
+ <string name="menu_advanced_search">advanced search</string>
+ <string name="menu_preferences">settings</string>
+ <string name="menu_library_hours">library hours</string>
+ <string name="menu_barcode_scan">barcode scan</string>
+
<!-- Header portion -->
<string name="library_text_logo"> Evergreen </string>
<string name="my_account_button_text">My Account</string>
<string name="hold_expire_time_hint">Hold expire time</string>
<string name="hold_thaw_date_hint">Date when the hold is frozen</string>
+ <!-- Checkout items -->
+ <string name="checkout_item_txt">Checkout items: </string>
+ <string name="add_to_calendar">Calendar reminder</string>
+
<!-- Fines Activity -->
<string name="total_owned">Total Owned </string>
<string name="total_paid">Total Paid</string>
<!-- Menu List Buttons -->
<style name="MenuListButton">
- <item name="android:background">@android:color/transparent</item>
<item name="android:layout_margin">5dip</item>
+ <item name="android:gravity">top|center_horizontal</item>
+ <item name="android:paddingTop">5dip</item>
+ <item name="android:textColor">#eee</item>
+ <item name="android:textStyle">bold</item>
+
</style>
<style name="MenuListRedButton">
package org.evergreen.android.accountAccess.checkout;
+import java.sql.Date;
import java.util.ArrayList;
+import java.util.Calendar;
import java.util.List;
import org.evergreen.android.R;
import android.app.Activity;
import android.app.ProgressDialog;
+import android.content.ContentResolver;
+import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
+import android.database.Cursor;
+import android.net.ParseException;
+import android.net.Uri;
import android.os.Bundle;
+import android.text.format.Time;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
-import android.widget.ImageButton;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
private TextView headerTitle;
+ private TextView itemsNo;
+
+
+
+ private Activity thisActivity;
+
@Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
+ thisActivity = this;
setContentView(R.layout.checkout_list);
setTitle("Checkout items");
//end header portion actions
context = this;
+ itemsNo = (TextView) findViewById(R.id.checkout_items_number);
accountAccess = AccountAccess.getAccountAccess();
lv = (ListView) findViewById(R.id.checkout_items_list);
circRecords = new ArrayList<CircRecord>();
for(int i=0;i<circRecords.size();i++)
listAdapter.add(circRecords.get(i));
+ itemsNo.setText(" " + circRecords.size() + "");
progressDialog.dismiss();
else
Toast.makeText(context, "You must be authenticated to retrieve circ records", Toast.LENGTH_LONG);
+
+
+
}
@Override
private TextView recordDueDate;
private TextView recordRenewals;
private TextView renewButton;
+ private CheckBox reminderNotification;
private List<CircRecord> records = new ArrayList<CircRecord>();
renewButton = (TextView) row.findViewById(R.id.renew_button);
+ reminderNotification = (CheckBox) row.findViewById(R.id.add_reminder_to_calendar);
+
renewButton.setText("renew : " + record.getRenewals());
renewButton.setOnClickListener(new OnClickListener() {
renew.start();
}
});
+
+ reminderNotification.setOnCheckedChangeListener(new OnCheckedChangeListener() {
+
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+
+ if(isChecked == true){
+ Toast.makeText(context, "Add ", Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+
//set text
System.out.println("Row" + record.getTitle() + " " + record.getAuthor() + " " + record.getDueDate() + " " + record.getRenewals());
recordTitle.setText(record.getTitle());
private View searchOptionsMenu = null;
- private ImageButton advancedSearchButton = null;
+ private Button advancedSearchButton = null;
- private ImageButton libraryHoursButton = null;
+ private Button libraryHoursButton = null;
- private ImageButton preferenceButton = null;
+ private Button preferenceButton = null;
- private ImageButton barcodeScanButton = null;
+ private Button barcodeScanButton = null;
private Button homeButton = null;
});
//end header portion actions
- advancedSearchButton = (ImageButton) findViewById(R.id.menu_advanced_search_button);
+ advancedSearchButton = (Button) findViewById(R.id.menu_advanced_search_button);
advancedSearchButton.setOnClickListener(new OnClickListener() {
@Override
AccountAccess ac = AccountAccess.getAccountAccess();
bookBags = ac.bookBags;
- libraryHoursButton = (ImageButton) findViewById(R.id.library_hours_button);
+ libraryHoursButton = (Button) findViewById(R.id.library_hours_button);
libraryHoursButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}
});
- preferenceButton = (ImageButton) findViewById(R.id.preference_button);
+ preferenceButton = (Button) findViewById(R.id.preference_button);
preferenceButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}
});
- barcodeScanButton = (ImageButton) findViewById(R.id.barcode_scan_button);
+ barcodeScanButton = (Button) findViewById(R.id.barcode_scan_button);
barcodeScanButton.setOnClickListener(new OnClickListener() {
@Override