Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. public void onCreate(Bundle savedInstanceState) {
  2. super.onCreate(savedInstanceState);
  3. setContentView(R.layout.rdc_select_account);
  4.  
  5. ActionBar actionBar = getActionBar();
  6. actionBar.setDisplayHomeAsUpEnabled(true);
  7. actionBar.setHomeButtonEnabled(true);
  8.  
  9. _context = this;
  10.  
  11. ArrayList<RDCAccount> accountsRDC = (ArrayList<RDCAccount>) getIntent().getSerializableExtra(Params.ACCOUNT);
  12. _rdcAccountsMap = new HashMap<String, RDCAccount>();
  13.  
  14. for (RDCAccount account : accountsRDC) {
  15. _rdcAccountsMap.put(account.getAccountId(), account);
  16. }
  17.  
  18. _app = ((AmeripriseClientApplication) this.getApplication());
  19.  
  20. setAccounts();
  21.  
  22. if (null == _accounts || _accounts.size() == 0) {
  23. AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
  24.  
  25. // set dialog message
  26. alertDialogBuilder
  27. .setMessage(getResources().getString(R.string.rdc_error))
  28. .setCancelable(false)
  29. .setTitle(getResources().getString(R.string.alert_title))
  30. .setPositiveButton(getResources().getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {
  31. public void onClick(DialogInterface dialog, int id) {
  32. dialog.dismiss();
  33. }
  34. });
  35.  
  36. // create alert dialog
  37. AlertDialog alertDialog = alertDialogBuilder.create();
  38.  
  39. // show it
  40. alertDialog.show();
  41. }
  42. else {
  43. doAccountTypeSort();
  44.  
  45. Accounts accountList = new Accounts();
  46. AccountListAdapter listAdapter = new AccountListAdapter(this, accountList);
  47.  
  48. listAdapter.setAccountList();
  49. ListView accountListView = (ListView) findViewById(R.id.accountListView);
  50. accountListView.setAdapter(listAdapter);
  51.  
  52. Command.GET_TAX_CUTOFF.executeLoading(this, null);
  53. }
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement