This will be called in order to create view, if the given view is not null,
it will be used directly, otherwise it will check the resourceId

@return null if both resourceId and view is not set
199097
@Nullable static View getView(Context context, int resourceId, View view) {
    LayoutInflater inflater = LayoutInflater.from(context);
    if (view != null) {
      return view;
    }
    if (resourceId != INVALID) {
      view = inflater.inflate(resourceId, null);
    }
    return view;
  }
683703
String getResourceIdOrThrow(CMAResource resource, String param) {
    final String resourceId = resource.getId();
    if (resourceId == null) {
      throw new IllegalArgumentException(String.format(
          "%s.setId() was not called.", param));
    }
    return resourceId;
  }
899637
public boolean init(Resource resource, Charset charset, boolean isUseVariable) {
		if (resource == null) {
			throw new NullPointerException("Null setting url define!");
		}
		this.settingUrl = resource.getUrl();
		this.charset = charset;
		this.isUseVariable = isUseVariable;

		return load();
	}
893775
@Override
    public View getView(int position, View convertView, ViewGroup parent) {
        Country country = getItem(position);

        if (convertView == null) {
            convertView = new ImageView(getContext());
        }

        ((ImageView) convertView).setImageResource(getFlagResource(country));

        return convertView;
    }
64241
public function createView()
    {
        if (!$this->formView) {
            $this->formView = new FormView();
        }

        $this->formView->setFormBlueprint($this->form);
        $this->formView->setFields($this->getProcessedFields());
        $this->formView->setSections($this->form->getSections());
        $this->formView->setMethod($this->getMethod());
        $this->formView->setName($this->getName());
        $this->formView->setEncoding($this->getEncoding());
        $this->formView->setAction($this->getAction());
        $this->formView->setSubmitted($this->isSubmitted());
        $this->formView->setValid($this->isValid());
        $this->formView->setErrors($this->getValidationErrors());
        $this->formView->setShouldShowSuccessMessage($this->shouldShowSuccessMessage());
        $this->formView->setSubmitButtonLabel($this->form->getSubmitButtonLabel());

        if (isset($this->restoreDataHandler)) {
            $this->restoreDataHandler->cancelRestore($this);
        }

        return $this->formView;
    }
682079
public View getIdenticalView(View view) {
		if(view == null){
			return null;
		}
		View viewToReturn = null;
		List<? extends View> visibleViews = RobotiumUtils.removeInvisibleViews(getCurrentViews(view.getClass(), true));

		for(View v : visibleViews){
			if(areViewsIdentical(v, view)){
				viewToReturn = v;
				break;
			}
		}

		return viewToReturn;
	}
489879
protected function createAction()
    {
        if (strtolower($this->option('type')) == 'regular' || $this->option('type') == null) {
            return $this->createView();
        }
        if (strtolower($this->option('type')) == 'controller') {
            return $this->createController();
        }
        return $this->createResourceController();
    }
780840
@SuppressWarnings("unchecked")
    public static <T extends View> T currentView() {
        if (currentMount == null) {
            return null;
        }
        return (T) currentMount.iterator.currentView();
    }
1224714
private int createView() {
        switch (mWidget.getUiStyle()) {
            case Widget.STYLE_DARK: {
                return R.layout.album_activity_album_dark;
            }
            case Widget.STYLE_LIGHT: {
                return R.layout.album_activity_album_light;
            }
            default: {
                throw new AssertionError("This should not be the case.");
            }
        }
    }
1098155
protected View getView(String viewName) {
        for (View view: solo.getCurrentViews()) {
            if (view.toString().contains(viewName)) {
                return view;
            }
        }

        return null;
    }
509992
@SuppressWarnings("unchecked")
	public <V extends View> V findView(View containerView, int id) {
		return (V)containerView.findViewById(id);
	}
745054
public void init(CmsElementView view, boolean useDefault) {

        m_currentView = view;
        if (!view.getId().equals(getViewSelector().getValue())) {
            getViewSelector().setValue(view.getId());
        }
        getVerticalLayout().removeAllComponents();

        List<CmsResourceTypeBean> typeBeans = m_typeHelper.getPrecomputedTypes(view);
        if (view.getId().equals(ID_VIEW_ALL)) {
            typeBeans = m_allTypes;
        }

        if (typeBeans == null) {

            LOG.warn("precomputed type list is null: " + view.getTitle(A_CmsUI.getCmsObject(), Locale.ENGLISH));
            return;
        }
        for (CmsResourceTypeBean type : typeBeans) {
            final String typeName = type.getType();
            String title = typeName;
            String subtitle = getSubtitle(type, useDefault);
            CmsExplorerTypeSettings explorerType = OpenCms.getWorkplaceManager().getExplorerTypeSetting(typeName);

            title = CmsVaadinUtils.getMessageText(explorerType.getKey());
            CmsResourceInfo info = new CmsResourceInfo(
                title,
                subtitle,
                CmsResourceUtil.getBigIconResource(explorerType, null));
            info.setData(type);
            m_resourceInfoMap.put(type, info);
            getVerticalLayout().addComponent(info);
        }
    }
957690
protected function handleCreateView()
    {
        $input = $this->getCommandInput();
        $resources = Resource::fromFile($input->resourceFile, $input->languageFileName);

        if ($this->metRequirements($resources)) {
            $this->info('Crafting views...');

            foreach ($this->getOnlyViews() as $view) {
                $this->call($this->getViewCommand($view), $input->getArrguments());
            }
        }
    }
810842
private void createViewIfNotExist(Map<String, MapReduce> views, String columnName)
    {
        if (views.get(columnName) == null)
        {
            createView(views, columnName);
        }
    }
882854
public final GridView getGridView() {
        return (gridView != null && gridView.getVisibility() == View.VISIBLE) ? gridView : null;
    }
292453
public View getView(int id, int timeout) {
        View v = null;
        int RETRY_PERIOD = 250;
        int retryNum = timeout / RETRY_PERIOD;

        for (int i = 0; i < retryNum; i++) {
            try {
                v = super.getView(id);
            } catch (Exception e) {}

            if (v != null) {
                break;
            }
            this.sleep(RETRY_PERIOD);
        }
        return v;
    }
419184
@Nullable public <VS> VS getViewState(@NonNull String viewId) {
    PresenterHolder holder = presenterMap.get(viewId);
    return holder == null ? null : (VS) holder.viewState;
  }