Replace the contents of a view (invoked by the layout manager)
433393
@Override
	public void onBindViewHolder(ViewHolder viewHolder, final int position) {
		if (jarr == null) return;
		Log.d(TAG, "Element " + position + " set.");
		// Get element from your dataset at this position and replace the contents of the view
		// with that element
		Log.d("jus", jarr.get(position).asJsonObject().getString("imageUrl"));

		viewHolder.niv.setImageUrl(jarr.get(position).asJsonObject().getString("imageUrl"),
				imageLoader);
		viewHolder.title.setText(jarr.get(position).asJsonObject().getString("title"));
		viewHolder.author.setText(jarr.get(position).asJsonObject().getString("author"));
		viewHolder.views.setText(jarr.get(position).asJsonObject().getInt("views").toString());
		viewHolder.favorites.setText(jarr.get(position).asJsonObject().getInt("favorites")
				.toString());


	}
581175
def set_layout(self, value):
        """"""
        # Can't do this with changes_squashed as it will call update_modified
        # from another thread and deadlock. Need RLock.is_owned() from update_*
        part_info = self.run_hooks(
            LayoutHook(p, c, self.port_info, value)
            for p, c in self.create_part_contexts(only_visible=False).items())
        with self.changes_squashed:
            layout_parts = LayoutInfo.filter_parts(part_info)
            name, mri, x, y, visible = [], [], [], [], []
            for part_name, layout_infos in layout_parts.items():
                for layout_info in layout_infos:
                    name.append(part_name)
                    mri.append(layout_info.mri)
                    x.append(layout_info.x)
                    y.append(layout_info.y)
                    visible.append(layout_info.visible)
            layout_table = LayoutTable(name, mri, x, y, visible)
            try:
                # Compare the Array seq to get at the numpy array
                np.testing.assert_equal(
                    layout_table.visible.seq, self.layout.value.visible.seq)
            except AssertionError:
                visibility_changed = True
            else:
                visibility_changed = False
            self.layout.set_value(layout_table)
            if self.saved_visibility is None:
                # First write of table, set layout and exports saves
                self.saved_visibility = layout_table.visible
                self.saved_exports = self.exports.value.to_dict()
                # Force visibility changed so we update_block_endpoints
                # even if there weren't any visible
                visibility_changed = True
            if visibility_changed:
                self.update_modified()
                self.update_exportable()
                # Part visibility changed, might have attributes or methods
                # that we need to hide or show
                self.update_block_endpoints()
1193976
function(root, force) {
    // Shift arguments around.
    if (typeof root === "boolean") {
      force = root;
      root = this;
    }

    // Allow removeView to be called on instances.
    root = root || this;

    // Iterate over all of the nested View's and remove.
    root.getViews().each(function(view) {
      // Force doesn't care about if a View has rendered or not.
      if (view.hasRendered || force) {
        LayoutManager._removeView(view, force);
      }

    // call value() in case this chain is evaluated lazily
    }).value();
  }
981887
def update_event(self, hint, obj):
        """"""

        tree = self.treeview
        data = obj
        item = self.get_item_by_data(obj)
        if item:
            if data.get_id() != tree.item(item, 'text'):
                tree.item(item, text=data.get_id())
            # if tree.parent(item) != '' and 'layout' in data:
            if tree.parent(item) != '':
                row = data.get_layout_property('row')
                col = data.get_layout_property('column')
                values = tree.item(item, 'values')
                if (row != values[1] or col != values[2]):
                    values = (data.get_class(), row, col)
                tree.item(item, values=values)
            self.draw_widget(item)
            self.app.set_changed()
859193
function(view) {
          view.hasModifier = view.removeModifier =
            view.addModifier = view.setModifier =
            view.toggleModifier = undefined;
        }
1059913
function(config) {
		
		var cfg = config;
		var self = this;
		var viewList = this.list();
		
		$(viewList).each(function(i, view) {
			
			if (!view.isInit) {
				
				if (view.dom !== 'undefined' && view.dom.main !== 'undefined') {
					
					if (i === 0 && self.cmp().placeholder()) {
						self.cmp().placeholder().replaceWith( view.dom.main );
					}
					
					if (i > 0) {
						viewList[ i - 1 ].dom.main.after( view.dom.main );
					}
					
				}
				
				view.isInit = true;
				
			}
			
		}).promise().done(function() {
			self.cmp().trigger('view.ready');
		});
		
	}
1129817
public void setContentView(int layoutResId) {
        switch (mDragMode) {
            case MenuDrawer.MENU_DRAG_CONTENT:
                mContentContainer.removeAllViews();
                LayoutInflater.from(getContext()).inflate(layoutResId, mContentContainer, true);
                break;

            case MenuDrawer.MENU_DRAG_WINDOW:
                mActivity.setContentView(layoutResId);
                break;
        }
    }
902410
function(el) {
            var that = this;
            var d = Q.defer();

            if (this.view != null) el = el || this.view.$el;
            this.on("loaded", function() {
                if (this.content == null) return;
                if (this.view != null) this.view.clearComponents();
                this.generate(this.args).then(function(content) {
                    el.html(content);
                    if (that.view != null) that.view.renderComponents();
                    that.trigger("updated");
                    d.resolve(el);
                }, function(err) {
                    logging.exception(err, "Error with template:");
                    d.reject(err);
                });
                
            }, this);
            this.load();

            return d.promise;
        }
617180
function (layoutMode) {
            // create a layout component with the new layout config
            var lastPage = config.page,
                lastZoom = config.zoom || 1,
                previousLayoutMode = config.layout,
                newLayout;

            // if there is already a layout, save some state
            if (layout) {
                // ignore this if we already have the specified layout
                if (layoutMode === previousLayoutMode) {
                    return layout;
                }

                lastPage = layout.state.currentPage;
                lastZoom = layout.state.zoomState;
            }

            newLayout = scope.createComponent('layout-' + layoutMode);
            if (!newLayout) {
                throw new Error('Invalid layout ' +  layoutMode);
            }

            // remove and destroy the existing layout component
            // @NOTE: this must be done after we decide if the
            // new layout exists!
            if (layout) {
                scope.destroyComponent(layout);
            }

            config.layout = layoutMode;

            layout = newLayout;
            layout.init();
            layout.setZoom(lastZoom.zoomMode || lastZoom.zoom || lastZoom);
            if (util.isFn(layout.scrollTo)) {
                layout.scrollTo(lastPage);
            }
            config.currentLayout = layout;

            scope.broadcast('layoutchange', {
                // in the context of event data, `layout` and `previousLayout`
                // are actually the name of those layouts, and not the layout
                // objects themselves
                previousLayout: previousLayoutMode,
                layout: layoutMode
            });
            return layout;
        }
1343455
private void adaptContentContainerVisibility() {
        if (contentContainer != null) {
            if (isCustomViewUsed()) {
                contentContainer.setVisibility(View.VISIBLE);
                notifyOnAreaShown(Area.CONTENT);
            } else {
                contentContainer.setVisibility(View.GONE);
                notifyOnAreaHidden(Area.CONTENT);
            }
        }
    }
1029424
public void updateEditorMode() {

        CmsClientSitemapEntry entry = getSitemapEntry();
        getListItemWidget().setIcon(CmsSitemapView.getInstance().getIconForEntry(entry));
        setAdditionalStyles(entry, getListItemWidget());
        for (Widget child : m_children) {
            if (child instanceof CmsSitemapTreeItem) {
                ((CmsSitemapTreeItem)child).updateEditorMode();
            }
        }
    }
888500
def populateViewTree(self, view):
        '''
        
        '''

        vuid = view.getUniqueId()
        text = view.__smallStr__()
        if view.getParent() is None:
            self.viewTree.insert('', Tkinter.END, vuid, text=text)
        else:
            self.viewTree.insert(view.getParent().getUniqueId(), Tkinter.END, vuid, text=text, tags=('ttk'))
            self.viewTree.set(vuid, 'T', '*' if view.isTarget() else ' ')
            self.viewTree.tag_bind('ttk', '<1>', self.viewTreeItemClicked)
1279487
private void refreshMargin() {
        if (isWeakReferenceValid()) {
            ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) getTextView().get().getLayoutParams();
            layoutParams.bottomMargin = mEdgeMarginInPx;
            layoutParams.topMargin = mEdgeMarginInPx;
            layoutParams.rightMargin = mEdgeMarginInPx;
            layoutParams.leftMargin = mEdgeMarginInPx;
            getTextView().get().setLayoutParams(layoutParams);
        }
    }
1258771
private void adaptTabLayoutVisibility() {
        if (tabLayout != null) {
            tabLayout.setVisibility(tabLayoutShown ? View.VISIBLE : View.GONE);
        }
    }
339476
function mapLayoutToPageData(pageData, layoutData) {
  // quickly (and shallowly) go through the layout's properties,
  // finding strings that map to page properties
  _.each(layoutData, function (list, key) {
    if (_.isString(list)) {
      if (_.isArray(pageData[key])) {
        // if you find a match and the data exists,
        // replace the property in the layout data
        layoutData[key] = _.map(pageData[key], refToObj);
      } else {
        // otherwise replace it with an empty list
        // as all layout properties are component lists
        layoutData[key] = [];
      }
    }
  });

  return layoutData;
}
800308
def show_replace(self):
        """"""
        self.show(hide_replace=False)
        for widget in self.replace_widgets:
            widget.show()
506337
function(view) {
        // If we're destroying, the entire subtree will be
        // freed, and the DOM will be handled separately,
        // so no need to mess with childViews.
        if (this.isDestroying) { return; }

        // update parent node
        set(view, '_parentView', null);

        // remove view from childViews array.
        var childViews = this._childViews;

        removeObject(childViews, view);

        this.propertyDidChange('childViews'); // HUH?! what happened to will change?

        return this;
      }