Example #1
0
 private void search() {
   String id = customerId.getText().toString().trim();
   String name = customerName.getText().toString().trim();
   String address = customerAddress.getText().toString().trim();
   if (StringUtil.isEmptyOrNull(id)
       && StringUtil.isEmptyOrNull(name)
       && StringUtil.isEmptyOrNull(address)) {
     Toast.makeText(this, R.string.search_tip, Toast.LENGTH_SHORT).show();
   } else {
     Bundle bundle = new Bundle();
     bundle.putString(PersistenceKey.CUSTOMER_ID, id);
     bundle.putString(
         PersistenceKey.CUSTOMER_ADDRESS, customerAddress.getText().toString().trim());
     bundle.putString(PersistenceKey.CUSTOMER_NAME, name);
     IntentUtil.redirectToNext(this, RecordListActivity.class, bundle);
   }
 }
Example #2
0
 @Override
 public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
   String imgPath = (String) adapter.getItem(position);
   if (!StringUtil.isEmptyOrNull(imgPath)) {
     Bundle bundle = new Bundle();
     bundle.putString(PersistenceKey.CUSTOMER_ID, customerId);
     bundle.putString(PersistenceKey.IMG_PATH, imgPath);
     bundle.putBoolean(PersistenceKey.IS_PEWVIEW, true);
     IntentUtil.redirectToNext(this, ImageViewer.class, bundle);
   }
 }