<?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="fill_parent"
- android:background="@color/background"
- >
-
- <RelativeLayout
- android:id="@+id/header"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@drawable/header_rounded_corners"
- android:paddingTop="3dip"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:background="@color/background"
>
-
- <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"
+ <RelativeLayout
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/my_account_button_text"
- android:padding="10dip"
- style="@style/HeaderButton"
- android:layout_alignTop="@+id/action_bar_home_button" android:layout_alignParentRight="true"
- android:layout_centerVertical="true" android:gravity="center_vertical" android:layout_marginTop="10dip"/>
-
+ android:orientation="horizontal"
+ android:background="@drawable/grey_rounded_corners"
+ android:paddingTop="3dip"
+ >
<LinearLayout
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:padding="4dp"
- android:id="@+id/search_text_container"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:layout_below="@id/action_bar_home_button">
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:padding="4dp"
+ android:id="@+id/search_text_container"
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:layout_below="@id/action_bar_home_button">
<EditText
android:id="@+id/searchText"
android:layout_weight="1"/>
</LinearLayout>
-
- <LinearLayout
- android:id="@+id/search_functions"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/search_text_container">
-
- <Spinner
- android:id="@+id/chose_organisation"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_weight="1"/>
-
- <ImageButton
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/search_text_container">
+
+ <Spinner
+ android:id="@+id/chose_organisation"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_weight="1"/>
+
+ <ImageButton
android:id="@+id/searchButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:src="@drawable/action_search"
-
+ android:src="@drawable/ic_action_search"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
- android:paddingBottom="5dp"/>
+ android:paddingBottom="5dp"/>
</LinearLayout>
</RelativeLayout>
+ <LinearLayout
+ android:id="@+id/search_preference_options"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_below="@id/header"
+ android:layout_centerHorizontal="true"
+ android:background="@drawable/background_grey_image"
+ android:gravity="center"
+ >
-
- <LinearLayout
- android:id="@+id/search_preference_options"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_below="@id/header"
- android:layout_centerHorizontal="true"
- android:background="@drawable/background_grey_image"
- android:gravity="center"
- >
-
-
- <Button
- android:id="@+id/menu_advanced_search_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/advanced_search"
- android:text="@string/menu_advanced_search"
-
- />
-
- <Button
- android:id="@+id/library_hours_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/library_hours"
- android:text="@string/menu_library_hours"
- />
-
-
- <Button
- android:id="@+id/preference_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/preferences"
- android:text="@string/menu_preferences"
+ </LinearLayout>
+ <LinearLayout android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/search_text"
+ android:layout_below="@id/search_preference_options"
+ >
+ <TextView
+ android:id="@+id/search_result_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"
/>
-
- <Button
- android:id="@+id/barcode_scan_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/barcode_scan"
- android:text="@string/menu_barcode_scan"
- />
-
-
-
- </LinearLayout>
- <LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:id="@+id/search_text"
- android:layout_below="@id/search_preference_options"
- >
- <TextView
- android:id="@+id/search_result_number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textStyle="bold"
- />
-
- </LinearLayout>
-
- <ListView
- android:id="@+id/search_results_list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_below="@id/search_text"
- ></ListView>
-</RelativeLayout>
\ No newline at end of file
+ </LinearLayout>
+
+ <ListView
+ android:id="@+id/search_results_list"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_below="@id/search_text"
+ ></ListView>
+</RelativeLayout>
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:paddingTop="32dp"
android:paddingLeft="17dp"
android:paddingRight="17dp"
>
android:text="@string/title_check_out"
android:id="@+id/account_btn_check_out"
android:onClick="onButtonClick"
- android:drawableStart="@drawable/items_checked_out"/>
+ android:drawableLeft="@drawable/items_checked_out"/>
<Button
android:layout_width="match_parent"
android:text="@string/title_holds"
android:id="@+id/account_btn_holds"
android:onClick="onButtonClick"
- android:drawableStart="@drawable/holds"/>
+ android:drawableLeft="@drawable/holds"/>
<Button
android:layout_width="match_parent"
android:text="@string/title_fines"
android:id="@+id/account_btn_fines"
android:onClick="onButtonClick"
- android:drawableStart="@drawable/fines"/>
+ android:drawableLeft="@drawable/fines"/>
<TextView
android:layout_width="20px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_button"
- android:layout_marginBottom="10dip"
/>
</LinearLayout>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:layout_weight="1"
- >
+ android:layout_weight="1"
+ >
<TextView
- android:id="@+id/checkout_record_title"
- style="@style/TitleSearchStyleList"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- />
+ android:id="@+id/checkout_record_title"
+ style="@style/TitleSearchStyleList"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
- <TextView
+ <TextView
android:id="@+id/checkout_record_author"
style="@style/AuthorSearchStyleList"
android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"/>
- <TextView
+ <TextView
android:id="@+id/checkout_due_date"
style="@style/PubSearchStyleList"
android:layout_width="fill_parent"
</LinearLayout>
- <Button
+ <Button
android:id="@+id/renew_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/renew_button"
- android:layout_gravity="center_vertical"
+ android:text="@string/renew_button"
+ android:layout_gravity="center_vertical"
style="@style/ApplicationButton"
/>
<?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="fill_parent"
- android:background="@color/background"
- >
-
- <LinearLayout
- android:id="@+id/search_text_container"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:orientation="vertical"
- android:padding="4dp"
- android:background="@drawable/grey_rounded_corners"
- android:layout_marginTop="4dip"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:background="@color/background"
>
- <EditText
- android:id="@+id/searchText"
+ <LinearLayout
+ android:id="@+id/search_text_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:hint="@string/search_hint"
- android:singleLine="true"/>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- >
-
- <Spinner
- android:id="@+id/chose_organisation"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_weight="1"
- android:gravity="center|left"
- android:spinnerMode="dialog" />
+ android:focusable="true"
+ android:focusableInTouchMode="true"
+ android:orientation="vertical"
+ android:padding="4dp"
+ android:background="@drawable/grey_rounded_corners"
+ android:layout_marginTop="4dip"
+ >
- <ImageButton
- android:id="@+id/searchButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingBottom="5dp"
- android:paddingLeft="10dp"
- android:paddingRight="10dp"
- android:paddingTop="5dp"
- android:src="@drawable/action_search" />
- </LinearLayout>
-
- </LinearLayout>
-
-
-
- <LinearLayout
- android:id="@+id/search_preference_options"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/search_text_container"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="5dip"
- android:gravity="center"
- android:orientation="vertical"
- android:background="@drawable/background_grey_image"
-
- >
+ <EditText
+ android:id="@+id/searchText"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/search_hint"
+ android:singleLine="true"/>
<LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- >
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ >
- <Button
- android:id="@+id/menu_advanced_search_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/advanced_search"
- android:text="@string/menu_advanced_search"
-
- />
+ <Spinner
+ android:id="@+id/chose_organisation"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:layout_weight="1"
+ android:gravity="center|left"
+ android:spinnerMode="dialog"/>
- <Button
- android:id="@+id/library_hours_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/library_hours"
- android:text="@string/menu_library_hours"
- />
+ <ImageButton
+ android:id="@+id/searchButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="5dp"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:paddingTop="5dp"
+ android:src="@drawable/ic_action_search"/>
</LinearLayout>
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="center" >
-
- <Button
- android:id="@+id/preference_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/preferences"
- android:text="@string/menu_preferences"
- />
-
- <Button
- android:id="@+id/barcode_scan_button"
- style="@style/MenuListButton"
- android:layout_width="96dp"
- android:layout_height="96dp"
- android:background="@drawable/barcode_scan"
- android:text="@string/menu_barcode_scan"
- />
-
- </LinearLayout>
</LinearLayout>
+
<LinearLayout
- android:id="@+id/search_text"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/search_preference_options" >
+ android:id="@+id/search_text"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/search_text_container">
<TextView
- android:id="@+id/search_result_number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textStyle="bold" />
+ android:id="@+id/search_result_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"/>
</LinearLayout>
<ListView
- android:id="@+id/search_results_list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:dividerHeight="1dp"
- android:layout_below="@id/search_text" >
+ android:id="@+id/search_results_list"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:dividerHeight="1dp"
+ android:layout_below="@id/search_text">
</ListView>
</RelativeLayout>
\ No newline at end of file
+++ /dev/null
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-
- <item
- android:id="@+id/action_settings"
- android:orderInCategory="100"
- android:showAsAction="never"
- android:title="@string/action_settings"/>
-
-</menu>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:yourapp="http://schemas.android.com/apk/res-auto">
+ <item android:id="@+id/action_search"
+ android:icon="@drawable/ic_action_search"
+ android:title="@string/title_search"
+ yourapp:showAsAction="ifRoom"/>
+</menu>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="bigActionButton_marginVertical">9dp</dimen>
+</resources>
distributed under the License is distributed on an "AS IS" BASIS,\r
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
See the License for the specific language governing permissions and\r
- limitations under the License.\r\r
+ limitations under the License.\r
+\r
-->\r
<resources>\r
\r
<dimen name="search_details_rect_text_size">16dip</dimen>\r
<dimen name="activity_horizontal_margin">16dp</dimen>\r
<dimen name="activity_vertical_margin">16dp</dimen>\r
+ <dimen name="bigActionButton_marginVertical">18dp</dimen>\r
\r
</resources>\r
<!-- Search -->
- <string name="browse_catalog">Library catalog</string>
<string name="search_hint">Search keywords</string>
<string name="advanced_search">Advanced Search</string>
<string name="loading_dialog_text"></string>
</style>
<style name="BigActionButton">
- <item name="android:layout_marginLeft">24dp</item>
- <item name="android:layout_marginTop">18dp</item>
<item name="android:layout_marginRight">24dp</item>
- <item name="android:layout_marginBottom">18dp</item>
+ <item name="android:layout_marginLeft">24dp</item>
+ <item name="android:layout_marginTop">@dimen/bigActionButton_marginVertical</item>
+ <item name="android:layout_marginBottom">@dimen/bigActionButton_marginVertical</item>
<item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/dark</item>
</style>
<style name="TitleSearchStyleList">
- <item name="android:textSize">18sp</item>
+ <item name="android:textSize">16sp</item>
<item name="android:gravity">left</item>
<item name="android:textStyle">bold</item>
+ <!--
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
+ -->
</style>
<style name="AuthorSearchStyleList">
private View searchOptionsMenu = null;
- private Button advancedSearchButton = null;
-
- private Button libraryHoursButton = null;
-
- private Button preferenceButton = null;
-
- private Button barcodeScanButton = null;
-
- private String advancedSearchString = null;
-
// marks when the fetching record thread is started
private boolean loadingElements = false;
return;
}
+ setContentView(R.layout.search_result_list);
+
+ // set up action bar
ActionBar actionBar = getSupportActionBar();
actionBar.setSubtitle(AccountAccess.userName);
+ actionBar.setDisplayHomeAsUpEnabled(true);
- setContentView(R.layout.search_result_list);
- setTitle(R.string.browse_catalog);
-
+ /*
advancedSearchButton = (Button) findViewById(R.id.menu_advanced_search_button);
advancedSearchButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// show advanced view dialog
- Intent advancedSearch = new Intent(context,
- AdvancedSearchActivity.class);
+ Intent advancedSearch = new Intent(context, AdvancedSearchActivity.class);
startActivityForResult(advancedSearch, 2);
}
});
+ */
+
// get bookbags
bookBags = AccountAccess.getAccountAccess().getBookbags();
- libraryHoursButton = (Button) findViewById(R.id.library_hours_button);
- libraryHoursButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- // TODO Auto-generated method stub
- }
- });
-
- preferenceButton = (Button) findViewById(R.id.preference_button);
- preferenceButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(getApplicationContext(),
- ApplicationPreferences.class);
- startActivity(intent);
- }
- });
-
- barcodeScanButton = (Button) findViewById(R.id.barcode_scan_button);
- barcodeScanButton.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View v) {
- Intent barcodeScan = new Intent(getApplicationContext(),
- CaptureActivity.class);
- startActivityForResult(barcodeScan, 10);
- }
- });
// singleton initialize necessary IDL and Org data
globalConfigs = GlobalConfigs.getGlobalConfigs(this);
context = this;
- search = SearchCatalog
- .getInstance((ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE));
+ search = SearchCatalog.getInstance((ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE));
recordList = new ArrayList<RecordInfo>();
adapter = new SearchArrayAdapter(getApplicationContext(),
R.layout.search_result_item, recordList);
+ //searchOptionsMenu = findViewById(R.id.search_preference_options);
searchResultsNumber = (TextView) findViewById(R.id.search_result_number);
// Get reference to ListView holder
lv = (ListView) this.findViewById(R.id.search_results_list);
- searchOptionsMenu = findViewById(R.id.search_preference_options);
-
progressDialog = new ProgressDialog(context);
// Set the ListView adapter
public void run() {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
- imm.hideSoftInputFromWindow(
- searchText.getWindowToken(), 0);
+ imm.hideSoftInputFromWindow(searchText.getWindowToken(), 0);
- searchOptionsMenu.setVisibility(View.GONE);
+ //searchOptionsMenu.setVisibility(View.GONE);
searchResultsNumber.setVisibility(View.VISIBLE);
progressDialog = ProgressDialog.show(
context,
getResources().getText(R.string.dialog_please_wait),
- getResources().getText(
- R.string.dialog_fetching_data_message));
+ getResources().getText(R.string.dialog_fetching_data_message));
}
});
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import org.evergreen_ils.R;
import org.evergreen_ils.accountAccess.fines.FinesActivity;
import org.evergreen_ils.accountAccess.holds.HoldsListView;
import org.evergreen_ils.globals.GlobalConfigs;
+import org.evergreen_ils.searchCatalog.SearchCatalogListView;
import org.evergreen_ils.views.splashscreen.SplashActivity;
/**
globalConfigs = GlobalConfigs.getGlobalConfigs(this);
}
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.menu_main, menu);
+ return super.onCreateOptionsMenu(menu);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ int id = item.getItemId();
+ if (id == R.id.action_search) {
+ startActivity(new Intent(getApplicationContext(), SearchCatalogListView.class));
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
public void onButtonClick(View v) {
int id = v.getId();
if (id == R.id.account_btn_check_out) {
</activity>
<activity
android:name="org.evergreen_ils.views.AccountScreenDashboard"
- android:theme="@android:style/Theme.Light.NoTitleBar" >
+ android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<activity android:name="org.evergreen_ils.views.ApplicationPreferences" >
</activity>
</activity>
<activity android:name="org.evergreen_ils.searchCatalog.MoreCopyInformation" >
</activity>
- <activity android:name="org.evergreen_ils.searchCatalog.SearchCatalogListView">
+ <activity
+ android:name="org.evergreen_ils.searchCatalog.SearchCatalogListView"
+ android:label="@string/title_search"
+ android:parentActivityName="org.evergreen_ils.views.MainActivity">
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="org.evergreen_ils.views.MainActivity"/>
</activity>
<activity android:name="org.evergreen_ils.searchCatalog.AdvancedSearchActivity" >
</activity>
<activity
android:name="org.evergreen_ils.auth.AuthenticatorActivity"
- android:label="@string/ou_account_label"
- android:theme="@android:style/Theme.Light" >
+ android:label="@string/ou_account_label">
+ <!-- android:theme="@android:style/Theme" -->
</activity>
<activity android:name="org.evergreen_ils.views.MainActivity">