android:layout_width="match_parent"
android:layout_height="56dp"
style="@style/BigActionButton"
+ android:text="@string/title_search"
+ android:id="@+id/main_btn_search"
+ android:onClick="onButtonClick"
+ android:drawableLeft="@drawable/kghostview"/>
+
+ <Button
+ android:layout_width="match_parent"
+ android:layout_height="56dp"
+ style="@style/BigActionButton"
android:text="@string/title_check_out"
android:id="@+id/account_btn_check_out"
android:onClick="onButtonClick"
android:background="@drawable/background_grey_image"
>
- <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/background_grey_image"
>
-
- <include android:id="@+id/header_actionbar" layout="@layout/simple_actionbar"/>
-
+
<LinearLayout
android:id="@+id/action_bar"
android:layout_width="wrap_content"
<string name="thaw_date">Activate hold on</string>
<string name="hold_phone_hint">Contact phone number</string>
<string name="hold_expire_time_hint">Hold expire time</string>
- <string name="hold_thaw_date_hint">Date when the hold is frozen</string>
+ <string name="hold_thaw_date_hint">Hold reactivate date</string>
<string name="hold_items">Items on hold: </string>
<!-- Checkout items -->
@Override
public void onClick(DialogInterface dialog,
int which) {
-
progressDialog = ProgressDialog.show(context,
getResources().getText(R.string.dialog_please_wait),
"Deleting Bookbag");
expire_date));
}
- // hide edit text
- if (record.thaw_date == null)
+ if (suspendHold.isChecked()) {
+ enableView(thaw_date_edittext);
+ } else {
disableView(thaw_date_edittext);
+ }
Log.d(TAG, record.title + " " + record.author);
import java.util.Set;
import java.util.Map.Entry;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.view.MenuItem;
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.widget.LinearLayout;
import android.widget.TextView;
-public class MoreCopyInformation extends Activity {
-
- private Button homeButton;
-
- private Button myAccountButton;
-
- private TextView headerTitle;
+public class MoreCopyInformation extends ActionBarActivity {
private Context context;
}
setContentView(R.layout.copy_information_more);
+
+ // set up action bar
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setSubtitle(AccountAccess.userName);
+ actionBar.setDisplayHomeAsUpEnabled(true);
+
gl = GlobalConfigs.getGlobalConfigs(context);
context = this;
record = (RecordInfo) getIntent().getSerializableExtra("recordInfo");
- // 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.copy_information_title);
- homeButton.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent(getApplicationContext(),
- SearchCatalogListView.class);
- startActivity(intent);
- }
- });
- // end header portion actions
-
LayoutInflater inf = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ int id = item.getItemId();
+ if (id == android.R.id.home) {
+ // make the action bar "up" caret work like "back"
+ onBackPressed();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
public void addCopyInfo(LayoutInflater inflater, LinearLayout insertPoint) {
for (int i = 0; i < record.copyInformationList.size(); i++) {
for (int i = start; i < stop; i++) {
- View copy_info_view = inflater.inflate(R.layout.copy_information,
- null);
+ View copy_info_view = inflater.inflate(R.layout.copy_information, null);
// fill in any details dynamically here
TextView library = (TextView) copy_info_view
library.setText(gl.getOrganizationName(record.copyInformationList
.get(i).org_id) + " ");
- call_number
- .setText(record.copyInformationList.get(i).call_number_sufix);
- copy_location
- .setText(record.copyInformationList.get(i).copy_location);
+ call_number.setText(record.copyInformationList.get(i).call_number_sufix);
+ copy_location.setText(record.copyInformationList.get(i).copy_location);
// insert into main view
insertPoint.addView(copy_info_view, new ViewGroup.LayoutParams(
*/
public class MainActivity extends ActionBarActivity {
- private Button checkedOutButton;
- private Button holdsButton;
- private Button finesButton;
private GlobalConfigs globalConfigs;
public void onCreate(Bundle savedInstanceState) {
} 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));
}
}
}
android:name="org.evergreen_ils.searchCatalog.SampleUnderlinesNoFade"
android:label="@string/search_details_title">
</activity>
- <activity android:name="org.evergreen_ils.searchCatalog.MoreCopyInformation" >
+ <activity
+ android:name="org.evergreen_ils.searchCatalog.MoreCopyInformation"
+ android:label="@string/copy_information_title">
</activity>
<activity
android:name="org.evergreen_ils.searchCatalog.SearchCatalogListView"