Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.rdc_select_account);
- ActionBar actionBar = getActionBar();
- actionBar.setDisplayHomeAsUpEnabled(true);
- actionBar.setHomeButtonEnabled(true);
- _context = this;
- ArrayList<RDCAccount> accountsRDC = (ArrayList<RDCAccount>) getIntent().getSerializableExtra(Params.ACCOUNT);
- _rdcAccountsMap = new HashMap<String, RDCAccount>();
- for (RDCAccount account : accountsRDC) {
- _rdcAccountsMap.put(account.getAccountId(), account);
- }
- _app = ((AmeripriseClientApplication) this.getApplication());
- setAccounts();
- if (null == _accounts || _accounts.size() == 0) {
- AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
- // set dialog message
- alertDialogBuilder
- .setMessage(getResources().getString(R.string.rdc_error))
- .setCancelable(false)
- .setTitle(getResources().getString(R.string.alert_title))
- .setPositiveButton(getResources().getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.dismiss();
- }
- });
- // create alert dialog
- AlertDialog alertDialog = alertDialogBuilder.create();
- // show it
- alertDialog.show();
- }
- else {
- doAccountTypeSort();
- Accounts accountList = new Accounts();
- AccountListAdapter listAdapter = new AccountListAdapter(this, accountList);
- listAdapter.setAccountList();
- ListView accountListView = (ListView) findViewById(R.id.accountListView);
- accountListView.setAdapter(listAdapter);
- Command.GET_TAX_CUTOFF.executeLoading(this, null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement