Android UI development started. Added dashboard activity main screen
authordrizea <danielrizea27@gmail.com>
Mon, 11 Jun 2012 18:45:40 +0000 (21:45 +0300)
committerdrizea <danielrizea27@gmail.com>
Mon, 11 Jun 2012 18:45:40 +0000 (21:45 +0300)
49 files changed:
Open-ILS/src/Android/.classpath [new file with mode: 0644]
Open-ILS/src/Android/.project [new file with mode: 0644]
Open-ILS/src/Android/AndroidManifest.xml
Open-ILS/src/Android/bin/EvergreenApp.apk
Open-ILS/src/Android/bin/classes.dex
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$dimen.class [new file with mode: 0644]
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$drawable.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$id.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$layout.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$string.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/R$style.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/R.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/accountAccess/AccountAccess.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/GlobalConfigs.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/Utils.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Info.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Simple.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalog.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$1.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1$1.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$3.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$SearchArrayAdapter.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView.class
Open-ILS/src/Android/bin/classes/org/evergreen/android/views/MainScreenDashboard.class [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/account_pref.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/book_bag.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/check_out.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/find_96.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/fines.png [new file with mode: 0644]
Open-ILS/src/Android/bin/res/drawable-hdpi/holds.png [new file with mode: 0644]
Open-ILS/src/Android/bin/resources.ap_
Open-ILS/src/Android/gen/org/evergreen/android/R.java
Open-ILS/src/Android/res/drawable-hdpi/account_pref.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/book_bag.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/check_out.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/find_96.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/fines.png [new file with mode: 0644]
Open-ILS/src/Android/res/drawable-hdpi/holds.png [new file with mode: 0644]
Open-ILS/src/Android/res/layout/dashbord_main.xml [new file with mode: 0644]
Open-ILS/src/Android/res/values/dimens.xml [new file with mode: 0644]
Open-ILS/src/Android/res/values/strings.xml
Open-ILS/src/Android/res/values/styles.xml
Open-ILS/src/Android/src/org/evergreen/android/globals/GlobalConfigs.java
Open-ILS/src/Android/src/org/evergreen/android/globals/Utils.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalog.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/src/org/evergreen/android/views/MainScreenDashboard.java [new file with mode: 0644]

diff --git a/Open-ILS/src/Android/.classpath b/Open-ILS/src/Android/.classpath
new file mode 100644 (file)
index 0000000..39e19df
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="gen"/>
+       <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+       <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+       <classpathentry kind="lib" path="lib/org.opensrf.jar"/>
+       <classpathentry kind="lib" path="lib/simple-xml-2.6.4.jar"/>
+       <classpathentry kind="output" path="bin/classes"/>
+</classpath>
diff --git a/Open-ILS/src/Android/.project b/Open-ILS/src/Android/.project
new file mode 100644 (file)
index 0000000..b7991ed
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>EvergreenApp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
index 8db0af6..e0e7e21 100644 (file)
         android:label="@string/app_name" 
         android:theme="@style/EvergreenTheme"
         >
+
         <activity
-            android:name=".searchCatalog.SearchCatalogListView"
-            android:label="@string/app_name" >
+            android:name=".views.MainScreenDashboard"
+            android:label="@string/app_name"
+            android:theme="@android:style/Theme.Light.NoTitleBar"
+             >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
-
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
         
+        <activity
+            android:name=".searchCatalog.SearchCatalogListView"
+            android:label="@string/app_name" >
+        </activity>
+        
         <activity android:name=".searchCatalog.RecordDetails_Info"></activity>
                <activity android:name=".searchCatalog.RecordDetails_Content"></activity>
         <activity android:name=".searchCatalog.RecordDetails_Details"></activity>
index de9db1e..51172c8 100644 (file)
Binary files a/Open-ILS/src/Android/bin/EvergreenApp.apk and b/Open-ILS/src/Android/bin/EvergreenApp.apk differ
index 19e5a56..18354ff 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes.dex and b/Open-ILS/src/Android/bin/classes.dex differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$dimen.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$dimen.class
new file mode 100644 (file)
index 0000000..8c6b06e
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$dimen.class differ
index b5e5945..e19bc0d 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$drawable.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$drawable.class differ
index cb2195a..040779d 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$id.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$id.class differ
index b4f75c1..bd324e9 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$layout.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$layout.class differ
index d16063e..c88bcae 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$string.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$string.class differ
index 68b4bab..2860873 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$style.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R$style.class differ
index f9bc5ee..22991f1 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/R.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/R.class differ
index 66bf99f..4c5de69 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/accountAccess/AccountAccess.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/accountAccess/AccountAccess.class differ
index f3b353e..a630995 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/GlobalConfigs.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/GlobalConfigs.class differ
index bbb2dda..c7d3d1e 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/Utils.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/globals/Utils.class differ
index 857337c..804753b 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Info.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Info.class differ
index 86dfba3..26025e2 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Simple.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/RecordDetails_Simple.class differ
index f171162..24913f6 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalog.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalog.class differ
index 414583a..470e825 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$1.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$1.class differ
index f41a89b..c550be4 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1$1.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1$1.class differ
index 8da4640..7673bbe 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2$1.class differ
index c56de43..309c58f 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$2.class differ
index 16f487c..5291850 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$3.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$3.class differ
index f5ef03a..06fb3f4 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$SearchArrayAdapter.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView$SearchArrayAdapter.class differ
index b16719c..90e5cb0 100644 (file)
Binary files a/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView.class and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/searchCatalog/SearchCatalogListView.class differ
diff --git a/Open-ILS/src/Android/bin/classes/org/evergreen/android/views/MainScreenDashboard.class b/Open-ILS/src/Android/bin/classes/org/evergreen/android/views/MainScreenDashboard.class
new file mode 100644 (file)
index 0000000..8f32ef1
Binary files /dev/null and b/Open-ILS/src/Android/bin/classes/org/evergreen/android/views/MainScreenDashboard.class differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/account_pref.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/account_pref.png
new file mode 100644 (file)
index 0000000..b1116eb
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/account_pref.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/book_bag.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/book_bag.png
new file mode 100644 (file)
index 0000000..6fc9c25
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/book_bag.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/check_out.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/check_out.png
new file mode 100644 (file)
index 0000000..80bd329
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/check_out.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/find_96.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/find_96.png
new file mode 100644 (file)
index 0000000..98169ce
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/find_96.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/fines.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/fines.png
new file mode 100644 (file)
index 0000000..7b32530
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/fines.png differ
diff --git a/Open-ILS/src/Android/bin/res/drawable-hdpi/holds.png b/Open-ILS/src/Android/bin/res/drawable-hdpi/holds.png
new file mode 100644 (file)
index 0000000..42d2625
Binary files /dev/null and b/Open-ILS/src/Android/bin/res/drawable-hdpi/holds.png differ
index 40468e4..9568ba7 100644 (file)
Binary files a/Open-ILS/src/Android/bin/resources.ap_ and b/Open-ILS/src/Android/bin/resources.ap_ differ
index 1f5c3f2..f94be63 100644 (file)
@@ -27,47 +27,73 @@ public final class R {
         public static final int title_text_alt=0x7f040002;
         public static final int white=0x7f04000c;
     }
+    public static final class dimen {
+        public static final int text_size_large=0x7f050003;
+        public static final int text_size_medium=0x7f050002;
+        public static final int text_size_small=0x7f050001;
+        public static final int title_height=0x7f050000;
+    }
     public static final class drawable {
-        public static final int action_search=0x7f020000;
-        public static final int address_book=0x7f020001;
-        public static final int ic_launcher=0x7f020002;
+        public static final int account_pref=0x7f020000;
+        public static final int action_search=0x7f020001;
+        public static final int address_book=0x7f020002;
+        public static final int book_bag=0x7f020003;
+        public static final int check_out=0x7f020004;
+        public static final int find_96=0x7f020005;
+        public static final int fines=0x7f020006;
+        public static final int holds=0x7f020007;
+        public static final int ic_launcher=0x7f020008;
     }
     public static final class id {
-        public static final int chose_organisation=0x7f070011;
-        public static final int record_details_info_author=0x7f070001;
-        public static final int record_details_info_publisher=0x7f070002;
-        public static final int record_details_info_title=0x7f070000;
-        public static final int record_details_simple_author=0x7f070004;
-        public static final int record_details_simple_isbn=0x7f070009;
-        public static final int record_details_simple_publisher=0x7f070005;
-        public static final int record_details_simple_series=0x7f070007;
-        public static final int record_details_simple_subject=0x7f070006;
-        public static final int record_details_simple_synopsis=0x7f070008;
-        public static final int record_details_simple_title=0x7f070003;
-        public static final int searchButton=0x7f07000f;
-        public static final int searchText=0x7f07000e;
-        public static final int search_record_author=0x7f07000c;
-        public static final int search_record_img=0x7f07000a;
-        public static final int search_record_publishing=0x7f07000d;
-        public static final int search_record_title=0x7f07000b;
-        public static final int search_results_list=0x7f070010;
+        public static final int chose_organisation=0x7f080017;
+        public static final int home_btn_feature1=0x7f080000;
+        public static final int home_btn_feature2=0x7f080001;
+        public static final int home_btn_feature3=0x7f080002;
+        public static final int home_btn_feature4=0x7f080003;
+        public static final int home_btn_feature5=0x7f080004;
+        public static final int home_btn_feature6=0x7f080005;
+        public static final int record_details_info_author=0x7f080007;
+        public static final int record_details_info_publisher=0x7f080008;
+        public static final int record_details_info_title=0x7f080006;
+        public static final int record_details_simple_author=0x7f08000a;
+        public static final int record_details_simple_isbn=0x7f08000f;
+        public static final int record_details_simple_publisher=0x7f08000b;
+        public static final int record_details_simple_series=0x7f08000d;
+        public static final int record_details_simple_subject=0x7f08000c;
+        public static final int record_details_simple_synopsis=0x7f08000e;
+        public static final int record_details_simple_title=0x7f080009;
+        public static final int searchButton=0x7f080015;
+        public static final int searchText=0x7f080014;
+        public static final int search_record_author=0x7f080012;
+        public static final int search_record_img=0x7f080010;
+        public static final int search_record_publishing=0x7f080013;
+        public static final int search_record_title=0x7f080011;
+        public static final int search_results_list=0x7f080016;
     }
     public static final class layout {
-        public static final int main=0x7f030000;
-        public static final int record_details_info=0x7f030001;
-        public static final int record_details_simple=0x7f030002;
-        public static final int search_result_item=0x7f030003;
-        public static final int search_result_list=0x7f030004;
+        public static final int dashbord_main=0x7f030000;
+        public static final int main=0x7f030001;
+        public static final int record_details_info=0x7f030002;
+        public static final int record_details_simple=0x7f030003;
+        public static final int search_result_item=0x7f030004;
+        public static final int search_result_list=0x7f030005;
     }
     public static final class string {
-        public static final int app_name=0x7f050001;
-        public static final int hello=0x7f050000;
+        public static final int app_name=0x7f060001;
+        public static final int hello=0x7f060000;
+        public static final int title_feature1=0x7f060002;
+        public static final int title_feature2=0x7f060003;
+        public static final int title_feature3=0x7f060004;
+        public static final int title_feature4=0x7f060005;
+        public static final int title_feature5=0x7f060006;
+        public static final int title_feature6=0x7f060007;
     }
     public static final class style {
-        public static final int EvergreenTheme=0x7f060004;
-        public static final int sectionHeader=0x7f060000;
-        public static final int spacer=0x7f060003;
-        public static final int textLarge=0x7f060002;
-        public static final int textSmall=0x7f060001;
+        public static final int EvergreenTheme=0x7f070004;
+        public static final int HomeButton=0x7f070005;
+        public static final int sectionHeader=0x7f070000;
+        public static final int spacer=0x7f070003;
+        public static final int textLarge=0x7f070002;
+        public static final int textSmall=0x7f070001;
     }
 }
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/account_pref.png b/Open-ILS/src/Android/res/drawable-hdpi/account_pref.png
new file mode 100644 (file)
index 0000000..27de986
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/account_pref.png differ
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/book_bag.png b/Open-ILS/src/Android/res/drawable-hdpi/book_bag.png
new file mode 100644 (file)
index 0000000..a6abc30
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/book_bag.png differ
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/check_out.png b/Open-ILS/src/Android/res/drawable-hdpi/check_out.png
new file mode 100644 (file)
index 0000000..95cd2b8
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/check_out.png differ
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/find_96.png b/Open-ILS/src/Android/res/drawable-hdpi/find_96.png
new file mode 100644 (file)
index 0000000..9846809
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/find_96.png differ
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/fines.png b/Open-ILS/src/Android/res/drawable-hdpi/fines.png
new file mode 100644 (file)
index 0000000..369aac8
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/fines.png differ
diff --git a/Open-ILS/src/Android/res/drawable-hdpi/holds.png b/Open-ILS/src/Android/res/drawable-hdpi/holds.png
new file mode 100644 (file)
index 0000000..8968581
Binary files /dev/null and b/Open-ILS/src/Android/res/drawable-hdpi/holds.png differ
diff --git a/Open-ILS/src/Android/res/layout/dashbord_main.xml b/Open-ILS/src/Android/res/layout/dashbord_main.xml
new file mode 100644 (file)
index 0000000..c847997
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:padding="6dip"
+    android:layout_weight="1"
+     >
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1">
+        <Button android:id="@+id/home_btn_feature1"
+            style="@style/HomeButton"
+            android:onClick="onClickFeature"
+            android:text="@string/title_feature1"
+            android:drawableTop="@drawable/find_96"/>
+        <Button android:id="@+id/home_btn_feature2"
+            style="@style/HomeButton"
+            android:onClick="onClickFeature"
+            android:text="@string/title_feature2"
+            android:drawableTop="@drawable/account_pref"/>
+    </LinearLayout>
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1">
+        <Button android:id="@+id/home_btn_feature3"
+            style="@style/HomeButton"
+            android:onClick="onClickFeature"
+            android:text="@string/title_feature3"
+            android:drawableTop="@drawable/check_out"/>
+        <Button android:id="@+id/home_btn_feature4"
+            style="@style/HomeButton"
+            android:onClick="onClickFeature"
+            android:text="@string/title_feature4"
+            android:drawableTop="@drawable/holds"/>
+    </LinearLayout>
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1">
+        <Button android:id="@+id/home_btn_feature5"
+            style="@style/HomeButton"
+            android:onClick="onClickFeature"
+            android:text="@string/title_feature5"
+            android:drawableTop="@drawable/fines"/>
+        <Button android:id="@+id/home_btn_feature6"
+            style="@style/HomeButton"
+            android:onClick="onClickFeature"
+            android:text="@string/title_feature6"
+            android:drawableTop="@drawable/book_bag"/>
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/values/dimens.xml b/Open-ILS/src/Android/res/values/dimens.xml
new file mode 100644 (file)
index 0000000..b31f993
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright 2011 Wglxy.com
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<resources>
+    <dimen name="title_height">45dip</dimen>
+    <dimen name="text_size_small">14sp</dimen>
+    <dimen name="text_size_medium">18sp</dimen>
+    <dimen name="text_size_large">22sp</dimen>
+</resources>
index 6fa0813..82d2ff0 100644 (file)
@@ -4,4 +4,11 @@
     <string name="hello">Hello World, EvergreenAppActivity!</string>
     <string name="app_name">EvergreenApp</string>
 
+    <string name="title_feature1">Search</string>
+    <string name="title_feature2">Account</string>
+    <string name="title_feature3">Check out items</string>
+    <string name="title_feature4">Holds</string>
+    <string name="title_feature5">Fines</string>
+    <string name="title_feature6">Book bags</string>
+    
 </resources>
\ No newline at end of file
index 4ea885f..37bdd8f 100644 (file)
     <style name="EvergreenTheme" parent="android:Theme.Black.NoTitleBar">
        </style>
     
+     <style name="HomeButton">
+        <item name="android:layout_gravity">center_vertical</item>
+        <item name="android:layout_width">fill_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_weight">1</item>
+        <item name="android:gravity">center_horizontal</item>
+        <item name="android:textSize">@dimen/text_size_medium</item>
+        <item name="android:textStyle">normal</item>
+        <item name="android:textColor">@color/foreground1</item>
+        <item name="android:background">@null</item>
+    </style>
+    
 </resources>
index f5ab2bc..6f07bbe 100644 (file)
@@ -1,6 +1,170 @@
 package org.evergreen.android.globals;
 
+import java.io.InputStream;
+import java.security.KeyStore.LoadStoreParameter;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+import org.evergreen.android.searchCatalog.Organisation;
+import org.open_ils.idl.IDLParser;
+
+import android.util.Log;
+
 public class GlobalConfigs {
 
-       //public static String httpAddress = "http://ulysses.calvin.edu";
+       public static String httpAddress = "http://ulysses.calvin.edu";
+
+       private boolean init = false;
+
+       private static String TAG = "GlobalConfigs";
+       
+       /** The locale. */
+       public String locale = "en-US";  
+       
+       private static GlobalConfigs globalConfigSingleton = null;
+       /** The organisations. */
+       public ArrayList<Organisation> organisations;
+       
+       /** The collections request. */
+       private String collectionsRequest = "/opac/common/js/";
+       
+       
+       private GlobalConfigs(){
+               
+               initialize();
+       }
+       
+       public static GlobalConfigs getGlobalConfigs(){
+               
+               if(globalConfigSingleton == null)
+               {
+                       globalConfigSingleton = new GlobalConfigs();
+               }
+               
+               return globalConfigSingleton;
+       }
+       
+       /* Initialize function that retrieves IDL file and Orgs file
+        */
+       private boolean initialize(){
+               
+               if(init == false){
+                       
+                       collectionsRequest += locale + "/OrgTree.js";
+                       init = true;
+                       loadIDLFile();
+                       getOrganisations();
+                       return true;
+               }
+               return false;
+       }
+       
+       private static void loadIDLFile(){
+               
+                        String idlFile = "/reports/fm_IDL.xml";
+                        try{
+                               Log.d("debug","Read fm");
+                               InputStream in_IDL = Utils.getNetInputStream(httpAddress + idlFile);
+                               IDLParser parser = new IDLParser(in_IDL);
+                               parser.parse();
+                       }catch(Exception e){
+                               System.err.println("Error in parsing IDL file " + idlFile + " " + e.getMessage());
+                       };
+               
+          }
+
+       /**
+        * Gets the organisations get's OrgTree.js from server, parses the input and recovers the organisations
+        *
+        * @return the organisations
+        */
+       private void getOrganisations(){
+               
+               String orgFile = null;
+               try{
+                       orgFile = Utils.getNetPageContent(httpAddress+collectionsRequest);
+                       System.out.println("Request org " + httpAddress + collectionsRequest );
+               }catch(Exception e){};
+               
+               
+               if(orgFile != null){
+                       System.out.println("Page content " + orgFile);
+                       
+                       String orgArray = orgFile.substring( orgFile.indexOf("=")+1, orgFile.indexOf(";"));  
+                       
+                       String arrayContent = orgArray.substring(orgArray.indexOf("[")+1,orgArray.lastIndexOf("]"));
+                       
+                       
+                       Log.d(TAG,"Array to pe parsed " + arrayContent);
+                       
+                       //parser for list
+                       
+                       //format [104,2,1,"Curriculum Center",1,"CURRICULUM"]  : [id,level,parent,name,can_have_volumes_bool,short_name]
+                       
+                       int index = 0;
+                       while(true){
+                               
+                               if(index >= arrayContent.length())
+                                       break;
+                               
+                               int start = arrayContent.indexOf("[", index)+1;
+                               int stop = arrayContent.indexOf("]", index);
+                               
+                               Log.d(TAG," start stop length index" + start+ " " + stop + " " + arrayContent.length() + " " + index);
+                               if(start == -1 || stop == -1)
+                                       break;
+                               
+                               index = stop+1;
+                               
+                               String content = arrayContent.substring(start,stop);
+                               
+                               System.out.println("Content " + content);
+                               
+                               StringTokenizer tokenizer = new StringTokenizer(content,",");
+                               
+                               Organisation org = new Organisation();
+                               
+                               //first is ID
+                               String element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.id = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //level
+                               element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.level = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //parent
+                               element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.parent = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //name
+                               element = (String)tokenizer.nextToken("\",");
+                               System.out.println("Element  " + element);
+                               org.name = element;
+                               
+                               //can_have_volume_boo.
+                               element = (String)tokenizer.nextElement();
+                               System.out.println("Element  " + element);
+                               try{
+                                       org.canHaveVolumesBool = Integer.parseInt(element);
+                               }catch(Exception e){};
+                               
+                               //short name
+                               element = (String)tokenizer.nextToken("\",");
+                               System.out.println("Element  " + element);
+                               org.shortName = element;
+                               
+                               organisations.add(org);
+                       }
+                       
+               }
+       }
 }
index fd8caf7..27dd591 100644 (file)
@@ -1,5 +1,81 @@
 package org.evergreen.android.globals;
 
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.DefaultHttpClient;
+
 public class Utils {
 
+       
+       /**
+        * Gets the net page content.
+        *
+        * @param url the url of the page to be retrieved
+        * @return the net page content
+        */
+       public static String getNetPageContent(String url){
+               
+               String result = "";
+               
+               HttpResponse response = null;
+               
+               try{
+                       HttpClient client = new DefaultHttpClient();
+                       HttpGet request = new HttpGet(url);
+                       response = client.execute(request);
+               }catch(Exception e){
+                       System.out.println("Exception to GET page " + url);     
+               }
+               StringBuilder str = null;
+               
+               try{
+                       InputStream in = response.getEntity().getContent();
+                       BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+                       str = new StringBuilder();
+                       String line = null;
+                       while((line = reader.readLine()) != null)
+                       {
+                           str.append(line);
+                       }
+                       in.close();
+               }catch(Exception e){
+                       System.err.println("Error in retrieving response " + e.getMessage());
+               }
+               
+               result = str.toString();
+
+               
+               return result;
+       }
+       
+       public static InputStream getNetInputStream(String url){
+               
+               InputStream in = null;
+               
+               HttpResponse response = null;
+               
+               try{
+                       HttpClient client = new DefaultHttpClient();
+                       HttpGet request = new HttpGet(url);
+                       response = client.execute(request);
+               }catch(Exception e){
+                       System.out.println("Exception to GET page " + url);     
+               }
+               StringBuilder str = null;
+               
+               try{
+                       in = response.getEntity().getContent();
+                       
+                       return in;
+               }catch(Exception e){
+                       System.err.println("Error in retrieving response " + e.getMessage());
+               }
+               
+               return in;
+       }
 }
index 3813c1c..892f95e 100644 (file)
@@ -1,19 +1,13 @@
 
 package org.evergreen.android.searchCatalog;
 
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.DefaultHttpClient;
+import org.evergreen.android.globals.Utils;
 import org.open_ils.idl.IDLParser;
 import org.opensrf.Method;
 import org.opensrf.net.http.GatewayRequest;
@@ -41,21 +35,12 @@ public class SearchCatalog {
        /** The conn. */
        public HttpConnection conn;
        
-       /** The collections request. */
-       public static String collectionsRequest = "/opac/common/js/";
-       
-       /** The locale. */
-       public String locale = "en-US";  
-       
        /** The http address. */
        public String httpAddress = "http://ulysses.calvin.edu";
        
        /** The TAG. */
        public String TAG = "SearchCatalog";
        
-       /** The organisations. */
-       public ArrayList<Organisation> organisations;
-       
        //the org on witch the searches will be made
        /** The selected organization. */
        private Organisation selectedOrganization = null;
@@ -67,164 +52,24 @@ public class SearchCatalog {
         * @param httpAddress the http address
         * @param locale the locale
         */
-       public SearchCatalog(String httpAddress, String locale, Context context) {
+       public SearchCatalog(String httpAddress, Context context) {
                super();
                this.context = context;
                this.httpAddress = httpAddress;
                try{
                        // configure the connection
                        conn = new HttpConnection(httpAddress+"/osrf-gateway-v1");
-                       this.locale = locale;
-                       collectionsRequest += locale + "/OrgTree.js";
+
                        
                }catch(Exception e){
                        System.err.println("Exception in establishing connection " +  e.getMessage());
                }
                //registering classes so no longer necessary to register object classes manually
-               readIDLFile();
 
-               this.organisations = new ArrayList<Organisation>();
-               getOrganisations();
        }
        
        
-       /**
-        * Gets the organisations get's OrgTree.js from server, parses the input and recovers the organisations
-        *
-        * @return the organisations
-        */
-       private void getOrganisations(){
-               
-               String orgFile = null;
-               try{
-                       orgFile = getNetPageContent(httpAddress+collectionsRequest);
-                       System.out.println("Request org " + httpAddress + collectionsRequest );
-               }catch(Exception e){};
-               
-               
-               if(orgFile != null){
-                       System.out.println("Page content " + orgFile);
-                       
-                       String orgArray = orgFile.substring( orgFile.indexOf("=")+1, orgFile.indexOf(";"));  
-                       
-                       String arrayContent = orgArray.substring(orgArray.indexOf("[")+1,orgArray.lastIndexOf("]"));
-                       
-                       
-                       Log.d(TAG,"Array to pe parsed " + arrayContent);
-                       
-                       //parser for list
-                       
-                       //format [104,2,1,"Curriculum Center",1,"CURRICULUM"]  : [id,level,parent,name,can_have_volumes_bool,short_name]
-                       
-                       int index = 0;
-                       while(true){
-                               
-                               if(index >= arrayContent.length())
-                                       break;
-                               
-                               int start = arrayContent.indexOf("[", index)+1;
-                               int stop = arrayContent.indexOf("]", index);
-                               
-                               Log.d(TAG," start stop length index" + start+ " " + stop + " " + arrayContent.length() + " " + index);
-                               if(start == -1 || stop == -1)
-                                       break;
-                               
-                               index = stop+1;
-                               
-                               String content = arrayContent.substring(start,stop);
-                               
-                               System.out.println("Content " + content);
-                               
-                               StringTokenizer tokenizer = new StringTokenizer(content,",");
-                               
-                               Organisation org = new Organisation();
-                               
-                               //first is ID
-                               String element = (String)tokenizer.nextElement();
-                               System.out.println("Element  " + element);
-                               try{
-                                       org.id = Integer.parseInt(element);
-                               }catch(Exception e){};
-                               
-                               //level
-                               element = (String)tokenizer.nextElement();
-                               System.out.println("Element  " + element);
-                               try{
-                                       org.level = Integer.parseInt(element);
-                               }catch(Exception e){};
-                               
-                               //parent
-                               element = (String)tokenizer.nextElement();
-                               System.out.println("Element  " + element);
-                               try{
-                                       org.parent = Integer.parseInt(element);
-                               }catch(Exception e){};
-                               
-                               //name
-                               element = (String)tokenizer.nextToken("\",");
-                               System.out.println("Element  " + element);
-                               org.name = element;
-                               
-                               //can_have_volume_boo.
-                               element = (String)tokenizer.nextElement();
-                               System.out.println("Element  " + element);
-                               try{
-                                       org.canHaveVolumesBool = Integer.parseInt(element);
-                               }catch(Exception e){};
-                               
-                               //short name
-                               element = (String)tokenizer.nextToken("\",");
-                               System.out.println("Element  " + element);
-                               org.shortName = element;
-                               
-                               organisations.add(org);
-                       }
-                       
-               }
-       }
        
-       
-       
-       /**
-        * Gets the net page content.
-        *
-        * @param url the url of the page to be retrieved
-        * @return the net page content
-        */
-       private String getNetPageContent(String url){
-               
-               String result = "";
-               
-               HttpResponse response = null;
-               
-               try{
-                       HttpClient client = new DefaultHttpClient();
-                       HttpGet request = new HttpGet(url);
-                       response = client.execute(request);
-               }catch(Exception e){
-                       System.out.println("Exception to GET page " + url);     
-               }
-               StringBuilder str = null;
-               
-               try{
-                       InputStream in = response.getEntity().getContent();
-                       BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-                       str = new StringBuilder();
-                       String line = null;
-                       while((line = reader.readLine()) != null)
-                       {
-                           str.append(line);
-                       }
-                       in.close();
-               }catch(Exception e){
-                       System.err.println("Error in retrieving response " + e.getMessage());
-               }
-               
-               result = str.toString();
-
-               
-               return result;
-       }
 
        /**
         * Gets the search results
@@ -403,16 +248,5 @@ public class SearchCatalog {
                
        }
        
-    private void readIDLFile(){
-       
-                String idlFile = "fm_IDL.xml";
-                try{
-                       Log.d("debug","Read fm");
-                       IDLParser parser = new IDLParser(context.getAssets().open(idlFile));
-                       parser.parse();
-               }catch(Exception e){
-                       System.err.println("Error in parsing IDL file " + idlFile + " " + e.getMessage());
-               };
-       
-   }
+
 }
index 7981b91..183128e 100644 (file)
@@ -4,6 +4,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.evergreen.android.R;
+import org.evergreen.android.globals.GlobalConfigs;
 import org.open_ils.idl.IDLParser;
 
 import android.app.Activity;
@@ -55,14 +56,18 @@ public class SearchCatalogListView extends Activity{
        
        private Spinner choseOrganisation;
        
+       private GlobalConfigs globalConfigs;
+       
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.search_result_list);
 
+        //singleton initialize necessary IDL and Org data
+        globalConfigs = GlobalConfigs.getGlobalConfigs();
         
         context = this;
-        search = new SearchCatalog("http://ulysses.calvin.edu","en-US",this);
+        search = new SearchCatalog("http://ulysses.calvin.edu",this);
                 
         recordList= new ArrayList<RecordInfo>();
 
@@ -155,10 +160,10 @@ public class SearchCatalogListView extends Activity{
         
         int selectedPos = 0;
         ArrayList<String> list = new ArrayList<String>();
-        for(int i=0;i<search.organisations.size();i++){
-               list.add(search.organisations.get(i).name);
+        for(int i=0;i<globalConfigs.organisations.size();i++){
+               list.add(globalConfigs.organisations.get(i).name);
                
-               if(search.organisations.get(i).level -1 == 0)
+               if(globalConfigs.organisations.get(i).level -1 == 0)
                        selectedPos = i;
         }
         
@@ -172,7 +177,7 @@ public class SearchCatalogListView extends Activity{
                        public void onItemSelected(AdapterView<?> arg0, View arg1,
                                        int ID, long arg3) {
                                //select the specific organization
-                               search.selectOrganisation(search.organisations.get(ID));
+                               search.selectOrganisation(globalConfigs.organisations.get(ID));
                                
                        }
                        
diff --git a/Open-ILS/src/Android/src/org/evergreen/android/views/MainScreenDashboard.java b/Open-ILS/src/Android/src/org/evergreen/android/views/MainScreenDashboard.java
new file mode 100644 (file)
index 0000000..18c4228
--- /dev/null
@@ -0,0 +1,136 @@
+
+package org.evergreen.android.views;
+
+import org.evergreen.android.R;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+
+
+public class MainScreenDashboard extends Activity {
+
+       /**
+        * onCreate - called when the activity is first created.
+        * 
+        * Called when the activity is first created. This is where you should do
+        * all of your normal static set up: create views, bind data to lists, etc.
+        * This method also provides you with a Bundle containing the activity's
+        * previously frozen state, if there was one.
+        * 
+        * Always followed by onStart().
+        * 
+        */
+
+       @Override
+       protected void onCreate(Bundle savedInstanceState) {
+               // TODO Auto-generated method stub
+               super.onCreate(savedInstanceState);
+               setContentView(R.layout.dashbord_main);
+       }
+
+       /**
+        * onDestroy The final call you receive before your activity is destroyed.
+        * This can happen either because the activity is finishing (someone called
+        * finish() on it, or because the system is temporarily destroying this
+        * instance of the activity to save space. You can distinguish between these
+        * two scenarios with the isFinishing() method.
+        * 
+        */
+
+       protected void onDestroy() {
+               super.onDestroy();
+       }
+
+       /**
+        * onPause Called when the system is about to start resuming a previous
+        * activity. This is typically used to commit unsaved changes to persistent
+        * data, stop animations and other things that may be consuming CPU, etc.
+        * Implementations of this method must be very quick because the next
+        * activity will not be resumed until this method returns. Followed by
+        * either onResume() if the activity returns back to the front, or onStop()
+        * if it becomes invisible to the user.
+        * 
+        */
+
+       protected void onPause() {
+               super.onPause();
+       }
+
+       /**
+        * onRestart Called after your activity has been stopped, prior to it being
+        * started again. Always followed by onStart().
+        * 
+        */
+
+       protected void onRestart() {
+               super.onRestart();
+       }
+
+       /**
+        * onResume Called when the activity will start interacting with the user.
+        * At this point your activity is at the top of the activity stack, with
+        * user input going to it. Always followed by onPause().
+        * 
+        */
+
+       protected void onResume() {
+               super.onResume();
+       }
+
+       /**
+        * onStart Called when the activity is becoming visible to the user.
+        * Followed by onResume() if the activity comes to the foreground, or
+        * onStop() if it becomes hidden.
+        * 
+        */
+
+       protected void onStart() {
+               super.onStart();
+       }
+
+       /**
+        * onStop Called when the activity is no longer visible to the user because
+        * another activity has been resumed and is covering this one. This may
+        * happen either because a new activity is being started, an existing one is
+        * being brought in front of this one, or this one is being destroyed.
+        * 
+        * Followed by either onRestart() if this activity is coming back to
+        * interact with the user, or onDestroy() if this activity is going away.
+        */
+
+       protected void onStop() {
+               super.onStop();
+       }
+       
+       public void onClickFeature (View v)
+       {
+           int id = v.getId ();
+           switch (id) {
+           /*
+             case R.id.home_btn_feature1 :
+                  startActivity (new Intent(getApplicationContext(), F1Activity.class));
+                  break;
+             case R.id.home_btn_feature2 :
+                  startActivity (new Intent(getApplicationContext(), F2Activity.class));
+                  break;
+             case R.id.home_btn_feature3 :
+                  startActivity (new Intent(getApplicationContext(), F3Activity.class));
+                  break;
+             case R.id.home_btn_feature4 :
+                  startActivity (new Intent(getApplicationContext(), F4Activity.class));
+                  break;
+             case R.id.home_btn_feature5 :
+                  startActivity (new Intent(getApplicationContext(), F5Activity.class));
+                  break;
+             case R.id.home_btn_feature6 :
+                  startActivity (new Intent(getApplicationContext(), F6Activity.class));
+                  break;
+             default: 
+                  break;
+           */
+           }
+           
+       }
+
+}