Code example for ArrayList

Methods: get, size

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();
            } 
        } else { 
            finish();
        } 
    } 
 
    private void startActivityFromString(String className) {
        try { 
            Class<?> activityClass = Class.forName(className);
            Intent intent = new Intent(this, activityClass);
            startActivityForResult(intent, REQUEST_CODE_SCREEN_FLOW);