<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="libs" level="project" />
- <orderEntry type="module" module-name="appcompat" />
+ <orderEntry type="module" module-name="appcompat" exported="" />
</component>
</module>
+++ /dev/null
-<?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/action_bar_home_button"
- 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/ou_app_label"
- android:textColor="@color/white"
- android:textSize="16sp"
- />
-
- </RelativeLayout>
-
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center"
- >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/account_btn_check_out"
- style="@style/HomeButton"
- android:layout_weight="1"
- android:drawableTop="@drawable/check_out"
- android:onClick="onButtonClick"
- android:text="@string/title_check_out" />
-
- <Button
- android:id="@+id/account_btn_holds"
- style="@style/HomeButton"
- android:layout_weight="1"
- android:drawableTop="@drawable/holds"
- android:onClick="onButtonClick"
- android:text="@string/title_holds" />
-
- <Button
- android:id="@+id/account_btn_fines"
- style="@style/HomeButton"
- android:layout_weight="1"
- android:drawableTop="@drawable/fines"
- android:onClick="onButtonClick"
- android:text="@string/title_fines" />
-
- <Button
- android:id="@+id/account_btn_book_bags"
- style="@style/HomeButton"
- android:layout_weight="1"
- android:drawableTop="@drawable/book_bag"
- android:onClick="onButtonClick"
- android:text="@string/title_book_bags" />
- </LinearLayout>
-
- </ScrollView>
-
-</LinearLayout>
\ No newline at end of file
<LinearLayout
android:id="@+id/search_text_container"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="4dp"
android:focusable="true"
- android:focusableInTouchMode="true"
- android:layout_below="@id/action_bar_home_button">
+ android:focusableInTouchMode="true">
<EditText
android:id="@+id/searchText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:layout_weight="1"/>
+ android:layout_weight="1"
+ android:spinnerMode="dialog"/>
<ImageButton
android:id="@+id/searchButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:src="@drawable/ic_action_search"
+ android:src="@drawable/abc_ic_search"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:orientation="vertical"
android:background="@color/background"
>
-
- <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-
+
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/background_grey_image"
>
-
- <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-
+
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+++ /dev/null
-<?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="fill_parent"
- android:orientation="vertical"
- 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/action_bar_home_button"
- 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/ou_app_label"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:paddingLeft="5dip"
- />
-
- </RelativeLayout>
-
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:gravity="center"
- >
- <Button android:id="@+id/account_btn_check_out"
- style="@style/HomeButton"
- android:onClick="onButtonClick"
- android:text="@string/title_check_out"
- android:drawableTop="@drawable/check_out"/>
- <Button android:id="@+id/account_btn_holds"
- style="@style/HomeButton"
- android:onClick="onButtonClick"
- android:text="@string/title_holds"
- android:drawableTop="@drawable/holds"/>
- </LinearLayout>
-
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:gravity="center"
- android:layout_weight="1">
- <Button android:id="@+id/account_btn_fines"
- style="@style/HomeButton"
- android:onClick="onButtonClick"
- android:text="@string/title_fines"
- android:drawableTop="@drawable/fines"/>
- <Button android:id="@+id/account_btn_book_bags"
- style="@style/HomeButton"
- android:onClick="onButtonClick"
- android:text="@string/title_book_bags"
- android:drawableTop="@drawable/book_bag"/>
- </LinearLayout>
-
-</LinearLayout>
\ No newline at end of file
android:background="@drawable/background_grey_image"
>
- <LinearLayout
- android:id="@+id/action_bar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:gravity="center_horizontal"
- android:layout_alignParentBottom="true"
- android:layout_centerInParent="true"
- android:paddingBottom="3dip"
- >
- <Button
- android:id="@+id/back_button"
- android:layout_width="100dip"
- android:layout_height="wrap_content"
- android:text="@string/back"
- style="@style/ApplicationButton"
- android:layout_margin="5dip"
- />
-
- <Button
- android:id="@+id/cancel_hold_button"
- android:layout_width="100dip"
- android:layout_height="wrap_content"
- android:text="@string/cancel_hold"
- style="@style/ApplicationButton"
- android:layout_margin="5dip"
- />
-
- <Button
- android:id="@+id/update_hold_button"
- android:layout_width="100dip"
- android:layout_height="wrap_content"
- android:text="@string/update_hold"
- style="@style/ApplicationButton"
- android:layout_margin="5dip"
- />
- </LinearLayout>
-
- <ScrollView
+ <ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_above="@id/action_bar"
- android:layout_below="@id/header_actionbar"
android:padding="5dp"
- >
+ android:layout_alignParentTop="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/author"
/>
-
- <TextView
+
+ <TextView
android:id="@+id/hold_author"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:gravity="center"
/>
</LinearLayout>
- <LinearLayout
+ <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
- <TextView
+ <TextView
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/physical_description"
/>
-
- <TextView
+
+ <TextView
android:id="@+id/hold_physical_description"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="4"
android:gravity="center"
- />
+ />
</LinearLayout>
- <LinearLayout
+ <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_weight="4"
android:gravity="center"
+ android:spinnerMode="dialog"
/>
</LinearLayout>
<LinearLayout
</ScrollView>
+ <LinearLayout
+ android:id="@+id/action_bar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_horizontal"
+ android:layout_alignParentBottom="true"
+ android:layout_centerInParent="true"
+ android:paddingBottom="3dip"
+ >
+ <Button
+ android:id="@+id/back_button"
+ android:layout_width="100dip"
+ android:layout_height="wrap_content"
+ android:text="@string/back"
+ style="@style/ApplicationButton"
+ android:layout_margin="5dip"
+ />
+
+ <Button
+ android:id="@+id/cancel_hold_button"
+ android:layout_width="100dip"
+ android:layout_height="wrap_content"
+ android:text="@string/cancel_hold"
+ style="@style/ApplicationButton"
+ android:layout_margin="5dip"
+ />
+
+ <Button
+ android:id="@+id/update_hold_button"
+ android:layout_width="100dip"
+ android:layout_height="wrap_content"
+ android:text="@string/update_hold"
+ style="@style/ApplicationButton"
+ android:layout_margin="5dip"
+ />
+ </LinearLayout>
+
+
</RelativeLayout>
\ No newline at end of file
android:layout_height="wrap_content"
android:layout_weight="4"
android:gravity="center"
+ android:spinnerMode="dialog"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/record_details_simple_copy_count"
android:textStyle="bold"
android:layout_height="wrap_content"
- android:layout_width="match_parent"/>
- <!-- style="@style/SeparatorInformation" -->
+ android:layout_width="match_parent"
+ />
<LinearLayout
android:id="@+id/record_details_copy_information"
android:focusableInTouchMode="true"
android:orientation="vertical"
android:padding="4dp"
- android:background="@drawable/grey_rounded_corners"
android:layout_marginTop="4dip"
>
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
- android:src="@drawable/ic_action_search"/>
+ android:src="@drawable/abc_ic_search"/>
</LinearLayout>
</LinearLayout>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- >
-
- <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/action_bar_home_button"
- 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/ou_app_label"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:paddingLeft="5dip"
- />
-
- <Button
- android:id="@+id/my_account_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="10dip"
- android:text="@string/my_account_button_text"
- style="@style/HeaderButton"
- android:layout_centerVertical="true" android:layout_alignParentRight="true"/>
- </RelativeLayout>
-
-</RelativeLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/junkTextView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:textColor="@color/dark"
+ android:padding="5dp"
+ android:gravity="center"
+ android:singleLine="true"
+ />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
- android:textColor="@color/dark"
+ android:textColor="?android:textColorPrimary"
android:padding="5dp"
android:gravity="center"
android:singleLine="true"
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="sectionHeader" parent="android:attr/listSeparatorTextViewStyle">
- <item name="android:layout_width">fill_parent</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:paddingTop">2dip</item>
- <item name="android:paddingBottom">2dip</item>
- <item name="android:paddingLeft">8dip</item>
- <item name="android:textSize">16sp</item>
- <item name="android:textStyle">bold</item>
- <item name="android:background">@color/background3</item>
- <item name="android:textColor">@color/foreground1</item>
- </style>
-
<style name="textSmall">
<item name="android:textSize">14sp</item>
<item name="android:paddingLeft">15dip</item>
<item name="android:layout_height">14dip</item>
</style>
- <style name="HomeButton">
- <item name="android:layout_gravity">center_vertical</item>
- <item name="android:layout_width">130dip</item>
- <item name="android:layout_height">130dip</item>
- <item name="android:layout_margin">5dip</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/dark</item>
- <item name="android:background">@drawable/menu_background_button</item>
- </style>
-
<style name="BigActionButton">
<item name="android:layout_marginRight">24dp</item>
<item name="android:layout_marginLeft">24dp</item>
<item name="android:textSize">14sp</item>
<item name="android:gravity">left</item>
<item name="android:textStyle">normal</item>
- <!--
- <item name="android:singleLine">italic</item>
- -->
<item name="android:ellipsize">end</item>
</style>
<style name="PubSearchStyleList">
<item name="android:textSize">12sp</item>
<item name="android:gravity">right</item>
- <!--
- <item name="android:textStyle">italic</item>
- -->
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
</style>
<!-- Tabs -->
- <style name="StyledIndicators" parent="@android:style/Theme.Light">
+ <style name="StyledIndicators" parent="@style/Theme.AppCompat">
<item name="vpiCirclePageIndicatorStyle">@style/CustomCirclePageIndicator</item>
<item name="vpiLinePageIndicatorStyle">@style/CustomLinePageIndicator</item>
<item name="vpiTitlePageIndicatorStyle">@style/CustomTitlePageIndicator</item>
<item name="android:textColor">@color/dark</item>
</style>
- <style name="SeparatorInformation">
- <item name="android:layout_width">fill_parent</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/shadow_rect</item>
- <item name="android:padding">5dip</item>
- <item name="android:layout_marginTop">10dip</item>
- <item name="android:textColor">@color/dark</item>
- <item name="android:gravity">center</item>
- <item name="android:textStyle">bold</item>
- </style>
-
<style name="SearchDetailsActionButton">
<item name="android:background">@drawable/details_button</item>
<item name="android:textColor">@drawable/dark_text_color</item>
import java.util.ArrayList;
import java.util.List;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
import org.evergreen_ils.searchCatalog.RecordInfo;
import org.evergreen_ils.searchCatalog.SearchCatalog;
import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
import android.widget.TextView;
import android.widget.Toast;
-public class BookBagDetails extends Activity {
+public class BookBagDetails extends ActionBarActivity {
private final String TAG = BookBagDetails.class.getName();
private Button delete_bookbag_button;
- private Button homeButton;
-
- private Button myAccountButton;
-
- private TextView headerTitle;
-
private Runnable getBookBagsItemsRunnable;
@Override
}
setContentView(R.layout.bookbagitem_list);
- // header portion actions
- homeButton = (Button) findViewById(R.id.action_bar_home_button);
- myAccountButton = (Button) findViewById(R.id.my_account_button);
-
- myAccountButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(getApplicationContext(),
- AccountScreenDashboard.class);
- startActivity(intent);
- }
- });
- homeButton.setText(R.string.bookbag_details_title);
- homeButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(getApplicationContext(),
- SearchCatalogListView.class);
- startActivity(intent);
- }
- });
- // end header portion actions
+ // set up action bar
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setSubtitle(AccountAccess.userName);
+ actionBar.setDisplayHomeAsUpEnabled(true);
accountAccess = AccountAccess.getAccountAccess();
bookBag = (BookBag) getIntent().getSerializableExtra("bookBag");
import java.util.ArrayList;
import java.util.List;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
import android.widget.TextView;
import android.widget.Toast;
-public class BookbagsListView extends Activity {
+public class BookbagsListView extends ActionBarActivity {
private final String TAG = BookbagsListView.class.getName();
private Runnable getBookbagsRunnable;
- private Button homeButton;
-
- private Button myAccountButton;
-
- private TextView headerTitle;
-
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bookbag_list);
- // header portion actions
- myAccountButton = (Button) findViewById(R.id.my_account_button);
- myAccountButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(getApplicationContext(),
- AccountScreenDashboard.class);
- startActivity(intent);
- }
- });
-
- homeButton = (Button) findViewById(R.id.action_bar_home_button);
- homeButton.setText(R.string.bookbag_items_title);
- homeButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(getApplicationContext(),
- SearchCatalogListView.class);
- startActivity(intent);
- }
- });
- // end header portion actions
+ // set up action bar
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setSubtitle(AccountAccess.userName);
+ actionBar.setDisplayHomeAsUpEnabled(true);
context = this;
accountAccess = AccountAccess.getAccountAccess();
import org.evergreen_ils.accountAccess.MaxRenewalsException;
import org.evergreen_ils.accountAccess.ServerErrorMessage;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
import org.evergreen_ils.globals.GlobalConfigs;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
+import org.evergreen_ils.utils.ui.CompatSpinnerAdapter;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
if (globalConfigs.organisations.get(i).id == record.pickup_lib)
selectedOrgPos = i;
}
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
- R.layout.spinner_layout, list);
+ ArrayAdapter<String> adapter = CompatSpinnerAdapter.CreateCompatSpinnerAdapter(this, list);
orgSelector.setAdapter(adapter);
-
orgSelector.setSelection(selectedOrgPos);
orgSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
import org.evergreen_ils.accountAccess.SessionNotFoundException;
import org.evergreen_ils.globals.GlobalConfigs;
import org.evergreen_ils.searchCatalog.ImageDownloader;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
import org.evergreen_ils.globals.GlobalConfigs;
import org.evergreen_ils.searchCatalog.Organisation;
import org.evergreen_ils.searchCatalog.RecordInfo;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.AccountScreenDashboard;
+import org.evergreen_ils.utils.ui.CompatSpinnerAdapter;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
selectedOrgPos = i;
}
}
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
- R.layout.spinner_layout, list);
+ ArrayAdapter<String> adapter = CompatSpinnerAdapter.CreateCompatSpinnerAdapter(this, list);
orgSelector.setAdapter(adapter);
orgSelector.setSelection(selectedOrgPos);
orgSelector.setOnItemSelectedListener(new OnItemSelectedListener() {
+++ /dev/null
-/*
- * 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_ils.globals;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-
-class ShowSessionNotAvailableRunnable implements Runnable {
-
- public Context context;
-
- public ShowSessionNotAvailableRunnable(Context context) {
- this.context = context;
- }
-
- @Override
- public void run() {
- AlertDialog alertDialog = new AlertDialog.Builder(context).create();
- alertDialog.setTitle("Error");
- alertDialog.setMessage("No session");
- alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int id) {
- dialog.dismiss();
- }
- });
-
- alertDialog.show();
- }
-
-}
\ No newline at end of file
return null;
}
- public static ShowSessionNotAvailableRunnable showSessionNotAvailableDialog(
- Context context) {
-
- return new ShowSessionNotAvailableRunnable(context);
- }
-
}
import android.support.v7.app.ActionBarActivity;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.globals.GlobalConfigs;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.Activity;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.utils.ui.*;
-import org.evergreen_ils.views.AccountScreenDashboard;
import org.evergreen_ils.views.splashscreen.SplashActivity;
import android.app.ProgressDialog;
import android.support.v7.app.ActionBarActivity;
import android.view.*;
import org.evergreen_ils.R;
-import org.evergreen_ils.R.layout;
import org.evergreen_ils.accountAccess.AccountAccess;
import org.evergreen_ils.accountAccess.SessionNotFoundException;
import org.evergreen_ils.accountAccess.bookbags.BookBag;
import org.evergreen_ils.accountAccess.holds.PlaceHold;
import org.evergreen_ils.barcodescan.CaptureActivity;
import org.evergreen_ils.globals.GlobalConfigs;
-import org.evergreen_ils.views.AccountScreenDashboard;
-import org.evergreen_ils.views.ApplicationPreferences;
+import org.evergreen_ils.utils.ui.CompatSpinnerAdapter;
import org.evergreen_ils.views.splashscreen.SplashActivity;
-import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
selectedOrgPos = i;
}
}
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
- layout.spinner_layout, list);
+ ArrayAdapter<String> adapter = CompatSpinnerAdapter.CreateCompatSpinnerAdapter(this, list);
choseOrganisation = (Spinner) findViewById(R.id.chose_organisation);
choseOrganisation.setAdapter(adapter);
choseOrganisation.setSelection(selectedOrgPos);
--- /dev/null
+package org.evergreen_ils.utils.ui;
+
+import android.content.Context;
+import android.os.Build;
+import android.widget.ArrayAdapter;
+import org.evergreen_ils.R;
+
+import java.util.ArrayList;
+
+/**
+ * Created by kenstir on 1/5/14.
+ */
+public class CompatSpinnerAdapter {
+ /** Create an ArrayAdapter for use in a spinner.
+ * This solves the problem running under theme Theme.AppCompat: under Gingerbread, the spinner dialog
+ * has a white background, even though the theme is dark, and the text is white-on-white.
+ * The fix is to use two different spinner layouts, one for GB with textColor="@color/dark"
+ * and one for newer versions with textColor="?android:textColorPrimary".
+ */
+ public static ArrayAdapter<String> CreateCompatSpinnerAdapter(Context context, ArrayList<String> list) {
+ int spinner_layout = (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB)
+ ? R.layout.spinner_gb_layout :
+ R.layout.spinner_layout;
+ ArrayAdapter<String> adapter = new ArrayAdapter<String>(context, spinner_layout, list);
+ return adapter;
+ }
+}
+++ /dev/null
-/*
- * 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_ils.views;
-
-import org.evergreen_ils.R;
-import org.evergreen_ils.accountAccess.bookbags.BookbagsListView;
-import org.evergreen_ils.accountAccess.checkout.ItemsCheckOutListView;
-import org.evergreen_ils.accountAccess.fines.FinesActivity;
-import org.evergreen_ils.accountAccess.holds.HoldsListView;
-import org.evergreen_ils.searchCatalog.SearchCatalogListView;
-import org.evergreen_ils.views.splashscreen.SplashActivity;
-
-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 {
-
- /**
- * 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().
- *
- */
-
- private Button homeButton = null;
-
- private Button myAccountButton = null;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- if (!SplashActivity.isAppInitialized()) {
- SplashActivity.restartApp(this);
- return;
- }
-
- setContentView(R.layout.dashbord_account);
-
-// myAccountButton = (Button) findViewById(R.id.my_account_button);
-// myAccountButton.setEnabled(false);
-// myAccountButton.setOnClickListener(new OnClickListener() {
-// @Override
-// public void onClick(View v) {
-// }
-// });
-
- homeButton = (Button) findViewById(R.id.action_bar_home_button);
- homeButton.setText(R.string.my_account_button_text);
- homeButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
-
- Intent intent = new Intent(getApplicationContext(),
- SearchCatalogListView.class);
- startActivity(intent);
- }
- });
- }
-
- /**
- * 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 onButtonClick(View v) {
- int id = v.getId();
- if (id == R.id.account_btn_check_out) {
- startActivity(new Intent(getApplicationContext(),
- ItemsCheckOutListView.class));
-
- } else if (id == R.id.account_btn_holds) {
- startActivity(new Intent(getApplicationContext(),
- HoldsListView.class));
-
- } else if (id == R.id.account_btn_fines) {
- startActivity(new Intent(getApplicationContext(),
- FinesActivity.class));
-
- } else if (id == R.id.account_btn_book_bags) {
- startActivity(new Intent(getApplicationContext(),
- BookbagsListView.class));
-
- }
-
- }
-
-}
} else if (id == R.id.account_btn_fines) {
startActivity(new Intent(getApplicationContext(), FinesActivity.class));
+ /*
} else if (id == R.id.account_btn_book_bags) {
startActivity(new Intent(getApplicationContext(), BookbagsListView.class));
+ */
} else if (id == R.id.main_btn_search) {
startActivity(new Intent(getApplicationContext(), SearchCatalogListView.class));
<activity
android:name="org.evergreen_ils.auth.AuthenticatorActivity"
android:label="@string/ou_account_label">
- <!-- android:theme="@android:style/Theme" -->
</activity>
<activity android:name="org.evergreen_ils.views.MainActivity">
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="core" />
- <orderEntry type="module" module-name="appcompat" />
</component>
</module>
# Project target.
target=android-19
android.library.reference.1=../core
-android.library.reference.2=../support/v7/appcompat