fix UI bug on small screen devices for my account dashboard landscape view
authordrizea <danielrizea27@gmail.com>
Thu, 16 Aug 2012 11:12:45 +0000 (14:12 +0300)
committerdrizea <danielrizea27@gmail.com>
Thu, 16 Aug 2012 11:12:45 +0000 (14:12 +0300)
Open-ILS/src/Android/res/layout-land/dashbord_account.xml [new file with mode: 0644]
Open-ILS/src/Android/res/layout-land/search_result_list.xml
Open-ILS/src/Android/res/layout/dashbord_main.xml [deleted file]
Open-ILS/src/Android/res/layout/search_result_footer_view.xml [deleted file]
Open-ILS/src/Android/res/layout/simple_tabs.xml [deleted file]
Open-ILS/src/Android/src/org/evergreen/android/accountAccess/checkout/ItemsCheckOutListView.java
Open-ILS/src/Android/src/org/evergreen/android/searchCatalog/SearchCatalogListView.java
Open-ILS/src/Android/src/org/evergreen/android/views/MainScreenDashboard.java [deleted file]
Open-ILS/src/Android/src/org/evergreen/android/views/splashscreen/SplashActivity.java

diff --git a/Open-ILS/src/Android/res/layout-land/dashbord_account.xml b/Open-ILS/src/Android/res/layout-land/dashbord_account.xml
new file mode 100644 (file)
index 0000000..b744cb6
--- /dev/null
@@ -0,0 +1,100 @@
+<?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:background="@drawable/background_grey_image"
+    android:orientation="vertical" >
+
+    <RelativeLayout
+        android:id="@+id/header"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/header_rounded_corners"
+        android:orientation="horizontal"
+        android:paddingBottom="2dip"
+        android:paddingTop="3dip" >
+
+        <Button
+            android:id="@+id/library_logo"
+            style="@style/LibraryLogoText"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentLeft="true"
+            android:layout_marginLeft="5dip"
+            android:drawableLeft="@drawable/evergreen_launcher_icon_48"
+            android:paddingLeft="5dip"
+            android:text="@string/library_text_logo"
+            android:textColor="@color/white"
+            android:textSize="16dp"
+            android:textStyle="bold"
+            android:typeface="monospace" />
+
+        <Button
+            android:id="@+id/my_account_button"
+            style="@style/HeaderButton"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_marginTop="5dip"
+            android:padding="10dip"
+            android:text="@string/my_account_button_text" />
+    </RelativeLayout>
+
+    <ScrollView
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent" >
+
+        <LinearLayout
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            
+             >
+
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:orientation="horizontal" >
+
+                <Button
+                    android:id="@+id/account_btn_check_out"
+                    style="@style/HomeButton"
+                    android:drawableTop="@drawable/check_out"
+                    android:onClick="onClickFeature"
+                    android:text="@string/title_check_out" />
+
+                <Button
+                    android:id="@+id/account_btn_holds"
+                    style="@style/HomeButton"
+                    android:drawableTop="@drawable/holds"
+                    android:onClick="onClickFeature"
+                    android:text="@string/title_holds" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:orientation="horizontal" >
+
+                <Button
+                    android:id="@+id/account_btn_fines"
+                    style="@style/HomeButton"
+                    android:drawableTop="@drawable/fines"
+                    android:onClick="onClickFeature"
+                    android:text="@string/title_fines" />
+
+                <Button
+                    android:id="@+id/account_btn_book_bags"
+                    style="@style/HomeButton"
+                    android:drawableTop="@drawable/book_bag"
+                    android:onClick="onClickFeature"
+                    android:text="@string/title_book_bags" />
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+
+</LinearLayout>
\ No newline at end of file
index 6e60915..227d788 100644 (file)
@@ -38,6 +38,7 @@
             android:layout_alignParentRight="true"
             android:padding="10dip"
             android:layout_marginTop="5dip"
+            style="@style/HeaderButton"
             />
 
 
diff --git a/Open-ILS/src/Android/res/layout/dashbord_main.xml b/Open-ILS/src/Android/res/layout/dashbord_main.xml
deleted file mode 100644 (file)
index 9c5075f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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/main_btn_search"
-            style="@style/HomeButton"
-            android:onClick="onClickFeature"
-            android:text="@string/title_search"
-            android:drawableTop="@drawable/find_96"/>
-        <Button android:id="@+id/main_btn_account"
-            style="@style/HomeButton"
-            android:onClick="onClickFeature"
-            android:text="@string/title_my_account"
-            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/main_btn_app_settings"
-            style="@style/HomeButton"
-            android:onClick="onClickFeature"
-            android:text="@string/title_application_settings"
-            android:drawableTop="@drawable/settings"/>
-        
-    </LinearLayout>
-
-
-</LinearLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/layout/search_result_footer_view.xml b/Open-ILS/src/Android/res/layout/search_result_footer_view.xml
deleted file mode 100644 (file)
index 0ed6c77..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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="wrap_content"
-    android:gravity="center"
-    android:background="@color/blue"
-     >
-
-    <ImageView
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"  
-        android:padding="20dip"     
-               android:gravity="center"
-               android:src="@drawable/expander_ic_maximized"
-               android:id="@+id/search_more_items_button"
-        />
-       
-</LinearLayout>
\ No newline at end of file
diff --git a/Open-ILS/src/Android/res/layout/simple_tabs.xml b/Open-ILS/src/Android/res/layout/simple_tabs.xml
deleted file mode 100644 (file)
index d729d59..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 Jake Wharton
-
-     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.
--->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-
-    <org.evergreen.android.utils.ui.TabPageIndicator
-        android:id="@+id/indicator"
-        android:layout_height="wrap_content"
-        android:layout_width="fill_parent"
-        />
-    <android.support.v4.view.ViewPager
-        android:id="@+id/pager"
-        android:layout_width="fill_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        />
-
-</LinearLayout>
\ No newline at end of file
index 55efc91..f6815b0 100644 (file)
@@ -250,16 +250,6 @@ public class ItemsCheckOutListView extends Activity {
             // Get item
             final CircRecord record = getItem(position);
 
-            if (record == null) {
-                Log.d(tag, "Starting XML view more infaltion ... ");
-                LayoutInflater inflater = (LayoutInflater) this.getContext()
-                        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-                row = inflater.inflate(R.layout.search_result_footer_view,
-                        parent, false);
-                Log.d(tag, "Successfully completed XML view more Inflation!");
-
-            } else {
-
                 // if it is the right type of view
                 if (row == null) {
 
@@ -407,7 +397,6 @@ public class ItemsCheckOutListView extends Activity {
                 recordTitle.setText(record.getTitle());
                 recordAuthor.setText(record.getAuthor());
                 recordDueDate.setText(record.getDueDate());
-            }
 
             return row;
         }
index 7fc865f..6d279de 100644 (file)
@@ -783,16 +783,6 @@ public class SearchCatalogListView extends Activity {
             // Get item
             RecordInfo record = getItem(position);
 
-            if (record.dummy == true) {
-                Log.d(tag, "Starting XML view more infaltion ... ");
-                LayoutInflater inflater = (LayoutInflater) this.getContext()
-                        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-                row = inflater.inflate(R.layout.search_result_footer_view,
-                        parent, false);
-                Log.d(tag, "Successfully completed XML view more Inflation!");
-
-            } else {
-
                 // if it is the right type of view
                 if (row == null
                         || row.findViewById(R.id.search_record_title) == null) {
@@ -833,7 +823,7 @@ public class SearchCatalogListView extends Activity {
                 recordAuthor.setText(record.author);
                 recordPublisher
                         .setText(record.pubdate + " " + record.publisher);
-            }
+            
             return row;
         }
     }
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
deleted file mode 100644 (file)
index c85bd95..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2012 Evergreen Open-ILS
- * @author Daniel-Octavian Rizea
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * or the License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be usefull,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- * 
- */
-package org.evergreen.android.views;
-
-import org.evergreen.android.R;
-import org.evergreen.android.globals.GlobalConfigs;
-import org.evergreen.android.searchCatalog.SearchCatalogListView;
-
-import android.app.Activity;
-import android.content.Intent;
-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) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.dashbord_main);
-
-        // init here globals,
-        // TODO in future do a splash screen (loading data)
-
-    }
-
-    /**
-     * 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.main_btn_search:
-            startActivity(new Intent(getApplicationContext(),
-                    SearchCatalogListView.class));
-            break;
-        case R.id.main_btn_account:
-            startActivity(new Intent(getApplicationContext(),
-                    AccountScreenDashboard.class));
-            break;
-        case R.id.main_btn_app_settings:
-            startActivity(new Intent(getApplicationContext(),
-                    ApplicationPreferences.class));
-            break;
-
-        default:
-            break;
-
-        }
-
-    }
-
-}
index b1bf948..006bce7 100644 (file)
@@ -27,12 +27,9 @@ import org.evergreen.android.globals.NoNetworkAccessException;
 import org.evergreen.android.globals.Utils;
 import org.evergreen.android.searchCatalog.SearchCatalogListView;
 import org.evergreen.android.views.ConfigureApplicationActivity;
-import org.evergreen.android.views.MainScreenDashboard;
 import org.evergreen.android.views.splashscreen.LoadingTask.LoadingTaskFinishedListener;
 
 import android.app.Activity;
-import android.app.Dialog;
-import android.app.ProgressDialog;
 import android.app.Service;
 import android.content.Context;
 import android.content.Intent;
@@ -40,14 +37,8 @@ import android.content.SharedPreferences;
 import android.net.ConnectivityManager;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.util.Log;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.EditText;
 import android.widget.ProgressBar;
 import android.widget.TextView;
-import android.widget.Toast;
 
 public class SplashActivity extends Activity implements
         LoadingTaskFinishedListener {