Initialize GridView with some injected data and configure OnItemClickListener.
322476
private void initializeGridView() {
    tvShowsGridView.setAdapter(adapter);
    tvShowsGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
      @Override public void onItemClick(AdapterView<?> adapterView, View view, int position,
          long id) {
        TvShowViewModel tvShow = adapter.getItem(position);
        tvShowSelected = tvShow;
        Picasso.with(getBaseContext())
            .load(tvShow.getFanArt())
            .placeholder(R.drawable.tv_show_placeholder)
            .into(fanArtImageView);
        renderEpisodesHeader(tvShow);
        renderEpisodes(tvShow);
        draggableView.setVisibility(View.VISIBLE);
        draggableView.maximize();
      }
    });
  }
331217
private synchronized void initializeListeners()
    {
        if (this.listenersByName == null) {
            this.listenersByEvent = new ConcurrentHashMap<>();
            this.listenersByName = new ConcurrentHashMap<>();

            // Can be null in unit tests
            if (this.componentManager != null) {
                try {
                    for (EventListener listener : this.componentManager
                        .<EventListener>getInstanceList(EventListener.class)) {
                        addListener(listener);
                    }
                } catch (ComponentLookupException e) {
                    this.logger.error("Failed to lookup listeners", e);
                }
            }
        }
    }
619637
protected void init(String appId, I_CmsAppUIContext context) {

        m_dialogContext = new ToolbarContext(appId);
        m_appContext = context;
        initContextMenu();
        m_itemsRight.addComponent(m_quickLaunchDropDown);
        m_itemsRight.addComponent(m_userDropDown);
        enableDefaultButtons(true);
    }
509617
private void initialize() {
		this.add(getMenuFile());
		this.add(getMenuEdit());
		this.add(getMenuView());
		this.add(getMenuAnalyse());
		this.add(getMenuReport());
		this.add(getMenuTools());
		this.add(getMenuImport());
		this.add(getMenuOnline());
		this.add(getMenuHelp());

	}
927680
@Override public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_tv_shows_sample);
    ButterKnife.inject(this);
    initializeDraggableView();
    initializeGridView();
    hookListeners();
  }
931132
def init_widget(self):
        
        super(AndroidListView, self).init_widget()
        d = self.declaration
        self.set_arrangement(d.arrangement)
546339
protected void init() {
        this.gridHeader = createGridHeader();
        this.grid = createGrid();
        buildLayout();
        setSizeFull();
        setImmediate(true);
        if (doSubscribeToEventBus()) {
            eventBus.subscribe(this);
        }
    }
381045
function init(grid) {
      options = $.extend(true, {}, _defaults, options);
      _grid = grid;
      if (options.enableForCells) _grid.onMouseEnter.subscribe(handleMouseEnter);
      if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.subscribe(handleHeaderMouseEnter);
    }
981442
public void bind(Object item) {
    this.item = item;
    if (onItemBindListener != null) {
      onItemBindListener.onItemBind(itemView, item, getAdapterPosition());
    }
  }
462467
private OnItemSelectedListener createItemSelectedListener() {
        return new OnItemSelectedListener() {

            @Override
            public void onItemSelected(final AdapterView<?> parent, final View view,
                                       final int position, final long id) {
                if (getOnItemSelectedListener() != null) {
                    getOnItemSelectedListener().onItemSelected(parent, view, position, id);
                }

                if (isValidatedOnValueChange() && position != 0) {
                    validate();
                }
            }

            @Override
            public void onNothingSelected(final AdapterView<?> parent) {
                if (getOnItemSelectedListener() != null) {
                    getOnItemSelectedListener().onNothingSelected(parent);
                }
            }

        };
    }
1261030
protected void init() {
        setSizeFull();
        setImmediate(true);
        setId(getGridId());
        if (!hasSingleSelectionSupport()) {
            setSelectionMode(SelectionMode.NONE);
        }
        setColumnReorderingAllowed(true);
        addNewContainerDS();
        if (doSubscribeToEventBus()) {
            eventBus.subscribe(this);
        }
    }
1013943
protected function onInit()
    {
        $this->filePath = Utility::get($this->params, "filePath");
        $this->fieldSeparator = Utility::get($this->params, "fieldSeparator", ",");
        $this->charset = Utility::get($this->params, "charset");
        $this->precision = Utility::get($this->params, "precision", 100);
        $this->firstRowData = Utility::get($this->params, "firstRowData", false);
    }
476537
def init_widget(self):
        
        super(AndroidChronometer, self).init_widget()
        w = self.widget
        w.setOnChronometerTickListener(w.getId())
        w.onChronometerTick.connect(self.on_chronometer_tick)
619417
private OnItemClickListener createItemClickListener() {
        return new OnItemClickListener() {

            @Override
            public void onItemClick(final AdapterView<?> parent, final View view,
                                    final int position, final long id) {
                if (itemClickListener != null && !rootView.isDragging() &&
                        !rootView.isAnimationRunning()) {
                    int index = position;

                    if (adapter.containsDividers()) {
                        for (int i = position; i >= 0; i--) {
                            if (adapter.getItem(i) == null ||
                                    (adapter.getItem(i) instanceof Divider &&
                                            i % adapter.getColumnCount() > 0)) {
                                index--;
                            }
                        }
                    }

                    itemClickListener.onItemClick(parent, view, index, getId(position));
                }

                dismiss();
            }

        };
    }
93363
void initUI(){
        mLogo = ButterKnife.findById(this, R.id.logo);
        mEulaText = ButterKnife.findById(this, R.id.eula_text);
        mActionCancel = ButterKnife.findById(this, R.id.action_cancel);
        mActionAccept = ButterKnife.findById(this, R.id.action_accept);

        mActionCancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                supportFinishAfterTransition();
            }
        });

        mActionAccept.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // do something
            }
        });
    }
1253899
def __init(self):
        """"""
        url = "%s/%s.json" % (self._url, self._itemId)
        params = {"f": "json"}
        json_dict = self._get(url, params,
                         securityHandler=self._securityHandler,
                         proxy_port=self._proxy_port,
                         proxy_url=self._proxy_url)
        self._json_dict = json_dict
        self._json = json.dumps(self._json_dict)
        setattr(self, "data", json_dict['data'])
        if 'data' in json_dict:
            for k,v in json_dict['data'].items():
                setattr(self, k, v)
                del k,v
1019370
def init_widget(self):
        
        w = self.dialog
        # Listen for events
        w.setOnDismissListener(w.getId())
        w.onDismiss.connect(self.on_dismiss)
        w.setOnCancelListener(w.getId())
        w.onCancel.connect(self.on_cancel)
        super(AndroidDialog, self).init_widget()