added header in the my account dashboard
authordrizea <danielrizea27@gmail.com>
Mon, 13 Aug 2012 20:51:08 +0000 (23:51 +0300)
committerdrizea <danielrizea27@gmail.com>
Mon, 13 Aug 2012 20:51:08 +0000 (23:51 +0300)
Open-ILS/src/Android/res/layout/dashbord_account.xml
Open-ILS/src/Android/src/org/evergreen/android/views/AccountScreenDashboard.java

index 69634f6..cafdbbe 100644 (file)
@@ -3,10 +3,45 @@
     android:layout_width="fill_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:padding="6dip"
-    android:layout_weight="1"
     android:background="@drawable/background_grey_image"
      >
+    
+    <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:paddingTop="3dip"
+        android:paddingBottom="2dip"
+         >
+
+        <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:text="@string/library_text_logo" 
+            android:textColor="@color/white"
+            android:textSize="16dp"
+            android:typeface="monospace"
+            android:textStyle="bold"
+            android:paddingLeft="5dip"
+            />
+        
+        <Button
+            android:id="@+id/my_account_button"
+            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>
+    
        <LinearLayout
         android:orientation="horizontal"
         android:layout_width="fill_parent"
index e878420..561f3ac 100644 (file)
@@ -6,11 +6,14 @@ import org.evergreen.android.accountAccess.bookbags.BookbagsListView;
 import org.evergreen.android.accountAccess.checkout.ItemsCheckOutListView;
 import org.evergreen.android.accountAccess.fines.FinesActivity;
 import org.evergreen.android.accountAccess.holds.HoldsListView;
+import org.evergreen.android.searchCatalog.SearchCatalogListView;
 
 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
 
 
 public class AccountScreenDashboard extends Activity {
@@ -27,11 +30,34 @@ public class AccountScreenDashboard extends Activity {
         * 
         */
 
+       private Button homeButton = null;
+
+       private Button myAccountButton = null;
+       
        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.dashbord_account);
                
+               myAccountButton = (Button) findViewById(R.id.my_account_button);
+
+               myAccountButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               
+                       }
+               });
+
+               homeButton = (Button) findViewById(R.id.library_logo);
+
+               homeButton.setOnClickListener(new OnClickListener() {
+                       @Override
+                       public void onClick(View v) {
+                               
+                               Intent intent = new Intent(getApplicationContext(),SearchCatalogListView.class);
+                               startActivity(intent);
+                       }
+               });
        }
 
        /**