Code example for ArrayList

Methods: get, size

0
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        screens = getIntent().getStringArrayListExtra(TOKEN_SCREENS);
        currIndex = 0;
        if (screens.size() == 0)
            finish();
 
        startActivityFromString(screens.get(0));
    } 
 
    @Override 
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == REQUEST_CODE_SCREEN_FLOW && resultCode == RESULT_OK) {
            currIndex++;
            if (currIndex < screens.size()) {
                String next = screens.get(currIndex);
                startActivityFromString(next);
            } else { 
                finish();