@Override public void run() { switch (mBackspaceLocation) { case LOCATION_HEADER: break; case LOCATION_FOOTER: ((ViewGroup) mHeader).removeView(mBackspace); // The row of the cell in which the backspace key should go. // This specifies the row index, which spans one increment, // and indicates the cell should be filled along the row // (horizontal) axis. final GridLayout.Spec rowSpec = GridLayout.spec( mNumberPad.getRowCount() - 1, GridLayout.FILL); // The column of the cell in which the backspace key should go. // This specifies the column index, which spans one increment, // and indicates the cell should be filled along the column // (vertical) axis. final GridLayout.Spec columnSpec = GridLayout.spec( mNumberPad.getColumnCount() - 1, GridLayout.FILL); mNumberPad.addView(mBackspace, new GridLayout.LayoutParams( rowSpec, columnSpec)); break; } }
private void populateFavorites(List<Song> favorites) { if(favorites != null) { GridLayout favoritesLayout = (GridLayout)getView().findViewById(R.id.favorites_layout); float favWidth = getContext().getResources().getDimension(R.dimen.album_grid_item_width); float favHeight = getContext().getResources().getDimension(R.dimen.album_grid_item_height); LayoutInflater inflater = LayoutInflater.from(getContext()); int max = Math.min(favorites.size(),3); for(int i = 0; i < max; i++) { Song song = favorites.get(i); View v = inflater.inflate(R.layout.album_grid_item, favoritesLayout, false); favoritesLayout.addView(v); ImageView artworkView = (ImageView) v.findViewById(R.id.album_artwork); } } }
public SuggestionViewHolder(View itemView) { super(itemView); suggestionRelative = (RelativeLayout) itemView.findViewById(R.id.suggestion_detail); suggestionDetailIcon = (ImageView) itemView.findViewById(R.id.suggestion_detail_icon); suggestionDetailInfo = (TextView) itemView.findViewById(R.id.suggestion_detail_info); suggestionDetailIntroduction = (TextView) itemView.findViewById(R.id.suggestion_detail_introduction); suggestionGrid = (GridLayout) itemView.findViewById(R.id.suggestion_grid); for (int i = 0; i < 6; i++) { View view = View.inflate(mContext, R.layout.item_suggestion_grid, null); view.setId(R.id.suggestion_view_id + i); GridLayout.LayoutParams params = new GridLayout.LayoutParams(); params.columnSpec = GridLayout.spec(GridLayout.UNDEFINED, 1f); params.setMargins(90, 15, 0, 15);//设置边距 view.setLayoutParams(params); suggestionType[i] = (TextView) view.findViewById(R.id.suggestion_type); suggestionInfo[i] = (TextView) view.findViewById(R.id.suggestion_info); suggestionIcon[i] = (ImageView) view.findViewById(R.id.suggestion_icon); suggestionGrid.addView(view); } }
public void generateColorBlocks(int[] colors, GridLayout layout) { int column = 3; int total = colors.length; int rows = total / column; layout.setColumnCount(column); layout.setRowCount(rows + 1); for (int i = 0, c = 0, r = 0; i < total; i++, c++) { if (c == column) { c = 0; r++; } GridLayout.LayoutParams layoutParams = new GridLayout.LayoutParams(); layoutParams.rowSpec = GridLayout.spec(r); layoutParams.columnSpec = GridLayout.spec(c); layoutParams.setGravity(Gravity.CENTER); ImageView imageView = new ImageView(layout.getContext()); imageView.setBackgroundColor(colorsParam[i]); imageView.setLayoutParams(layoutParams); layout.addView(imageView); } }
public void setData(Collection<Row> rows) { gridLayout.removeViews(1, gridLayout.getChildCount() - 1); for (Row row : rows) { { TextView nameView = new TextView(getContext()); TextViewCompat.setTextAppearance(nameView, android.support.v7.appcompat.R.style.TextAppearance_AppCompat_Body1); nameView.setText(row.name()); GridLayout.LayoutParams params = new GridLayout.LayoutParams(); params.columnSpec = GridLayout.spec(GridLayout.UNDEFINED, 1f); gridLayout.addView(nameView, params); } { TextView valueView = new TextView(getContext()); TextViewCompat.setTextAppearance(valueView, android.support.v7.appcompat.R.style.TextAppearance_AppCompat_Body1); valueView.setText(row.value()); gridLayout.addView(valueView); } } }
@Override protected void onPostExecute(TimeSearchResult timeSearchResult) { if (timeSearchResult == null) { Log.i(TAG, "onPostExecute: 失败 查询时效 获得空结果"); return; } Log.d(TAG, "onPostExecute: 成功 查询时效 获得数量: " + timeSearchResult.getEntries().size()); GridLayout gridLayout = mActivity.getGridLayout(); gridLayout.removeAllViews(); gridLayout.setColumnCount(2); for (TimeSearchResult.Entry entry : timeSearchResult.getEntries()) { String companyName = entry.getCompanyName(); String time = entry.getTime(); HttpUrl logoUrl = HttpUrl.parse(entry.getCompanyLogoUrl()); CardView card = (CardView) mActivity.getLayoutInflater().inflate(R.layout.card_time, mActivity.getGridLayout(), false); ImageView logo = (ImageView) card.findViewById(R.id.logo); TextView companyNameText = (TextView) card.findViewById(R.id.company_name); TextView timeText = (TextView) card.findViewById(R.id.time); fetcher.DownloadImage(this, logoUrl, logo); companyNameText.setText(companyName.trim()); timeText.setText(time.trim()); mActivity.getGridLayout().addView(card); } }
/** * 将倒影布局添加到GridLayout容器中 */ private void addReflectionImageView() { mReflectionImageView = new ImageView(mContext); GridLayout.LayoutParams layoutParams = new GridLayout.LayoutParams(); layoutParams.width = mColumnCount * mBaseWidth + ((mColumnCount > 1 ? mHorizontalMargin * (mColumnCount - 1) : 0)); layoutParams.height = mBaseHeight; layoutParams.rowSpec = GridLayout.spec(mRowCount - 1, 1); layoutParams.columnSpec = GridLayout.spec(0, mColumnCount); mReflectionImageView.setLayoutParams(layoutParams); mReflectionImageView.setScaleType(ImageView.ScaleType.FIT_XY); this.refreshReflection(0); mGridLayout.addView(mReflectionImageView); mReflectionImageView.setVisibility(mVisibility); }
@NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { int preselect = getArguments().getInt("preselect"); View view = View.inflate(getActivity(), R.layout.dialog_color_chooser, null); mColors = initColors(); GridLayout gridLayout = (GridLayout) view.findViewById(R.id.grid); for (int i = 0; i < mColors.length; i++) { gridLayout.addView(getColorItemView(getActivity(), i, i == preselect)); } AlertDialog dialog = new AlertDialog.Builder(getActivity()) .setTitle(R.string.color_chooser) .setView(view) .show(); return dialog; }
@Override protected void createMainSectionContent(LinearLayout mainSectionLayout) { Context context = mainSectionLayout.getContext(); // Add a label that will be used to indicate that the total cart price has been updated. addUpdateText(mainSectionLayout); // The breakdown is represented by an end-aligned GridLayout that takes up only as much // space as it needs. The GridLayout ensures a consistent margin between the columns. mBreakdownLayout = new GridLayout(context); mBreakdownLayout.setColumnCount(2); LayoutParams breakdownParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); breakdownParams.gravity = Gravity.END; mainSectionLayout.addView(mBreakdownLayout, breakdownParams); // Sets the summary right text view takes the same available space as the summary left // text view. LinearLayout.LayoutParams rightTextViewLayoutParams = (LinearLayout.LayoutParams) getSummaryRightTextView().getLayoutParams(); rightTextViewLayoutParams.width = 0; rightTextViewLayoutParams.weight = 1f; }
private View createOptionIcon(GridLayout parent, int rowIndex, boolean editIconExists) { // The icon has a pre-defined width. ImageView optionIcon = new ImageView(parent.getContext()); optionIcon.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO); if (mOption.isEditable()) { optionIcon.setMaxWidth(mEditableOptionIconMaxWidth); } else { optionIcon.setMaxWidth(mNonEditableOptionIconMaxWidth); } optionIcon.setAdjustViewBounds(true); optionIcon.setImageDrawable(mOption.getDrawableIcon()); // Place option icon at column three if no edit icon. int columnStart = editIconExists ? 2 : 3; GridLayout.LayoutParams iconParams = new GridLayout.LayoutParams(GridLayout.spec(rowIndex, 1, GridLayout.CENTER), GridLayout.spec(columnStart, 1, GridLayout.CENTER)); iconParams.topMargin = mVerticalMargin; parent.addView(optionIcon, iconParams); optionIcon.setOnClickListener(OptionSection.this); return optionIcon; }
private void addBuffersToView(Context context, int count, boolean isRow) { for (int i = 0; i < count; i++) { GridLayout.LayoutParams gridParams; if (isRow) { gridParams = new GridLayout.LayoutParams(GridLayout.spec(i), GridLayout.spec(0)); gridParams.width = 1; gridParams.height = (int)cellHeight; } else { gridParams = new GridLayout.LayoutParams(GridLayout.spec(0), GridLayout.spec(i)); gridParams.width = (int)cellWidth; gridParams.height = 1; } Space space = new Space(context); space.setLayoutParams(gridParams); this.addView(space, gridParams); } }
private void addFieldView(Context context, String form, GridStyle style, GridCoordinate coordinateData, String fieldString, String sortField, int index) { if (coordinatesInvalid(coordinateData)) { return; } ViewId uniqueId = ViewId.buildTableViewId(coordinateData.getX(), coordinateData.getY(), false); GridLayout.LayoutParams gridParams = getLayoutParamsForField(coordinateData); View view = getView(context, style, form, fieldString, uniqueId, sortField, gridParams.width, gridParams.height); if (!(view instanceof ImageView)) { gridParams.height = LayoutParams.WRAP_CONTENT; } view.setLayoutParams(gridParams); mFieldViews[index] = view; this.addView(view, gridParams); }
private void fillSensorsTextViews(String source) { ArrayList<InfoItem> infoItemArray = getData(); for (int i = 0; i < mLayoutData.getChildCount(); i++) { InfoItem item = infoItemArray.get(i); if (!item.getTitle().equals(source)) continue; LinearLayout layout = (LinearLayout) mLayoutData.getChildAt(i); GridLayout values = (GridLayout) layout.findViewById(R.id.gl_values); for (int j = 0; j < item.size(); j++) { TextView data = (TextView) values.getChildAt(j); InfoColumn column = item.getColumns().get(j); setValue(data, column); } } }
private void updateView() { removeAllViews();// remove all views int size = urls != null ? urls.size() : 0; int columnCount = getCol(size); for (int i = 0; i < size; ++i) { GridLayout.Spec row = GridLayout.spec(i / columnCount); GridLayout.Spec col = GridLayout.spec(i % columnCount, 1.0f); ImageView imageView = getImageView(i); //由于宽(即列)已经定义权重比例 宽设置为0 保证均分 GridLayout.LayoutParams layoutParams = new GridLayout.LayoutParams(new ViewGroup.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT)); layoutParams.rowSpec = row; layoutParams.columnSpec = col; layoutParams.setMargins(margin, margin, margin, margin); addView(imageView, layoutParams); } getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { ViewGroup.LayoutParams lp = getLayoutParams(); if (getHeight() > 0 && lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) { lp.height = getHeight(); setLayoutParams(lp); getViewTreeObserver().removeOnGlobalLayoutListener(this); } } }); }
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { LayoutInflater layoutInflater = LayoutInflater.from(getActivity()); View rootView = layoutInflater.inflate(R.layout.color_preference_items, null); mColorGrid = (GridLayout) rootView.findViewById(R.id.color_grid); mColorGrid.setColumnCount(mPreference.mNumColumns); repopulateItems(); return new AlertDialog.Builder(getActivity()) .setView(rootView) .create(); }
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ArrayList<Week> weeks = new Gson().fromJson(getArguments().getString(BUNDLE_WEEKS, ""), new TypeToken<ArrayList<Week>>() {}.getType()); View view = inflater.inflate(R.layout.activity_main_home_fragment, container, false); ButterKnife.bind(this, view); SimpleDateFormat format = TimeUtils.createLongDateFormat(); Calendar cal = Calendar.getInstance(); date.setText(WordUtils.capitalize(format.format(new Date()))); week.setText(String.format("Semaine %d", cal.get(Calendar.WEEK_OF_YEAR))); ArrayList<WrapperEventWeek> wrappers = WeekManager.getNextEvents(weeks, 1); for (WrapperEventWeek wrap : wrappers) { CardView card = new CardView(getContext()); EventView eventView = new EventView(getContext(), EventView.EventViewType.CONDENSED); eventView.setData(wrap.getEvent(), wrap.getWeek()); card.addView(eventView); GridLayout.LayoutParams params = new GridLayout.LayoutParams(); params.columnSpec = GridLayout.spec(GridLayout.UNDEFINED, 1f); params.setGravity(Gravity.FILL_VERTICAL); int margin = UIUtils.dp(getContext(), 10); params.setMargins(margin, margin, margin, margin); card.setLayoutParams(params); daysContainer.addView(card); } return view; }
public static SubjectFactory<GridLayoutSubject, GridLayout> type() { return new SubjectFactory<GridLayoutSubject, GridLayout>() { @Override public GridLayoutSubject getSubject(FailureStrategy fs, GridLayout that) { return new GridLayoutSubject(fs, that); } }; }
public TableCardLayout(Context context, AttributeSet attrs) { super(context, attrs); int leftRightPadding = getResources().getDimensionPixelOffset(R.dimen.padding_normal); int topBottomPadding = getResources().getDimensionPixelOffset(R.dimen.padding_three_halves); setContentPadding(leftRightPadding, topBottomPadding, leftRightPadding, topBottomPadding); gridLayout = (GridLayout) LayoutInflater.from(getContext()).inflate(R.layout.pokemon_table_card, this, false); titleView = (TextView) gridLayout.findViewById(R.id.title); addView(gridLayout); if (attrs != null) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TableCardLayout); String title = a.getString(R.styleable.TableCardLayout_android_title); if (title != null) { titleView.setText(title); } a.recycle(); } if (isInEditMode()) { setData(Arrays.asList( new Row("speed", "45"), new Row("special-defense", "65"), new Row("special-attack", "65"), new Row("defense", "49"), new Row("attack", "49"), new Row("hp", "45") )); } }
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { MaterialDialog dialog = new MaterialDialog.Builder(getActivity()) .title(R.string.dialog_choose_read_bg_color) .theme(mTheme) .autoDismiss(false) .customView(R.layout.dialog_color_chooser, false) .build(); final GridLayout list = (GridLayout) dialog.getCustomView().findViewById(R.id.grid); final int preselect = getArguments().getInt("preselect", -1); for (int i = 0; i < list.getChildCount(); i++) { FrameLayout child = (FrameLayout) list.getChildAt(i); if (i < mDrawables.length) { child.setTag(i); child.setOnClickListener(this); child.getChildAt(0).setVisibility(preselect == i ? View.VISIBLE : View.GONE); } else { child.getChildAt(0).setVisibility(View.GONE); continue; } //Drawable selector = createSelector(mDrawables[i]); setBackgroundCompat(child, mDrawables[i]); } return dialog; }
@Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mGridLayout = (GridLayout) inflater.inflate(R.layout.fragment_backup_gridlayout, container, false); tvFromDatePicker = mGridLayout.findViewById(R.id.tvFromDatePicker); tvToDatePicker = mGridLayout.findViewById(R.id.tvToDatePicker); spFormats = mGridLayout.findViewById(R.id.spFormats); ResourcesHelper.setLeftCompoundDrawable(mGridLayout, R.id.tvFrom, R.drawable.calendar_today); ResourcesHelper.setLeftCompoundDrawable(mGridLayout, R.id.tvTo, R.drawable.calendar); ResourcesHelper.setLeftCompoundDrawable(mGridLayout, R.id.tvType, R.drawable.file); tvFromDatePicker.setOnClickListener(this); tvToDatePicker.setOnClickListener(this); tvFromDatePicker.setText(DateTimeHelper.convertLocalDateToString(mFromDate)); tvToDatePicker.setText(DateTimeHelper.convertLocalDateToString(mToDate)); if (null != savedInstanceState) { spFormats.setSelection(savedInstanceState.getInt(KEY_SELECTED_FORMAT_INT, 0)); } if (null != mAsyncTask) { // To start progress dialog again. mAsyncTask.onPreExecute(); } return mGridLayout; }
private GridBuilder(Context context, GridLayout gridLayout) { this.mContext = context; this.mGridLayout = gridLayout; this.mLayoutInflater = LayoutInflater.from(context); // 不使用默认margin this.mGridLayout.setUseDefaultMargins(false); this.mGridLayout.setAlignmentMode(GridLayout.ALIGN_BOUNDS); this.mGridLayout.setClipChildren(false); this.mGridLayout.setClipToPadding(false); }
public GridViewHolder(GridLayout gridLayout) { mGridLayout = gridLayout; mAddedView = new LinkedBlockingQueue<>(); mRemovedView = new LinkedBlockingQueue<>(); init(); }
@Override protected void onCreate(Bundle savedInstanceState) { Log.i(getClass().getName(), "onCreate"); super.onCreate(savedInstanceState); setContentView(R.layout.activity_student_selection); LiteracyApplication literacyApplication = (LiteracyApplication) getApplication(); studentDao = literacyApplication.getDaoSession().getStudentDao(); studentSelectionGridLayout = (GridLayout) findViewById(R.id.studentSelectionGridLayout); }
private View getColorItemView(final Context context, int position, boolean isSelect) { int color = mColors[position]; int widthImageCheckView = Utils.convertDensityPix(context, 24); int widthColorView = Utils.convertDensityPix(context, 56); int widthMargin = Utils.convertDensityPix(context, 4); ImageView imageView = new ImageView(context); imageView.setImageResource(R.drawable.ic_done_white_24dp); FrameLayout.LayoutParams ivParams = new FrameLayout.LayoutParams(widthImageCheckView, widthImageCheckView); ivParams.gravity = Gravity.CENTER; imageView.setLayoutParams(ivParams); imageView.setVisibility(isSelect ? View.VISIBLE : View.INVISIBLE); FrameLayout frameLayout = new FrameLayout(context); GridLayout.LayoutParams params = new GridLayout.LayoutParams(new FrameLayout.LayoutParams(widthColorView, widthColorView)); params.setGravity(Gravity.CENTER); params.setMargins(widthMargin, widthMargin, widthMargin, widthMargin); frameLayout.setLayoutParams(params); setBackgroundSelector(frameLayout, color); frameLayout.addView(imageView); frameLayout.setOnClickListener(this); frameLayout.setTag(position); return frameLayout; }
@Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); // GridLayout内のアイテムをレイアウトサイズに合わせてストレッチ final GridLayout gl = (GridLayout) findViewById(R.id.calcFrame); int childWidth = gl.getWidth() / gl.getColumnCount(); int childHeight = gl.getHeight() / gl.getRowCount(); for (int i = 0; i < gl.getChildCount(); i++) { gl.getChildAt(i).setMinimumWidth(childWidth); gl.getChildAt(i).setMinimumHeight(childHeight); } }
public OptionRow(GridLayout parent, int rowIndex, int rowType, @Nullable PaymentOption item, boolean isSelected) { assert item != null || rowType != OPTION_ROW_TYPE_OPTION; boolean optionIconExists = item != null && item.getDrawableIcon() != null; boolean editIconExists = item != null && item.isEditable() && isSelected; boolean isEnabled = item != null && item.isValid(); mRowType = rowType; mOption = item; mButton = createButton(parent, rowIndex, isSelected, isEnabled); mLabel = createLabel(parent, rowIndex, optionIconExists, editIconExists, isEnabled); mOptionIcon = optionIconExists ? createOptionIcon(parent, rowIndex, editIconExists) : null; mEditIcon = editIconExists ? createEditIcon(parent, rowIndex) : null; }
private View createEditIcon(GridLayout parent, int rowIndex) { View editorIcon = LayoutInflater.from(parent.getContext()) .inflate(R.layout.payment_option_edit_icon, null); // The icon floats to the right of everything. GridLayout.LayoutParams iconParams = new GridLayout.LayoutParams(GridLayout.spec(rowIndex, 1, GridLayout.CENTER), GridLayout.spec(3, 1, GridLayout.CENTER)); iconParams.topMargin = mVerticalMargin; parent.addView(editorIcon, iconParams); editorIcon.setOnClickListener(OptionSection.this); return editorIcon; }
@Override protected void createMainSectionContent(LinearLayout mainSectionLayout) { Context context = mainSectionLayout.getContext(); mCheckingProgress = createLoadingSpinner(); mOptionLayout = new GridLayout(context); mOptionLayout.setColumnCount(4); mainSectionLayout.addView(mOptionLayout, new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); }
/** * Растягиваем изображения по ширине при открытии спойлера */ void openSpoiler(){ spoilerBody.setVisibility(View.VISIBLE); if(openned) return; spoilerBody.post(new Runnable() { @Override public void run() { openned = true; int viewscount = spoilerBody.getChildCount(); for (int i = 0; i < viewscount; i++) { // находим галлерею if(spoilerBody.getChildAt(i) instanceof GridLayout){ GridLayout grid = (GridLayout) spoilerBody.getChildAt(i); int viewCount = grid.getChildCount(); // не более 3 на строку int column = viewCount > 3 ? 3 : viewCount; for (int g = 0; g < viewCount; g++) { View v = grid.getChildAt(g); GridLayout.LayoutParams itemParams = (GridLayout.LayoutParams) v.getLayoutParams(); itemParams.width = (grid.getWidth()/column) - itemParams.rightMargin - itemParams.leftMargin; v.setLayoutParams(itemParams); } } } } }); }
private void buildViews() { post(new Runnable() { @Override public void run() { if(checkWifth == getWidth()) return; checkWifth = getWidth(); // если 1 элемент то ничего не делаем int viewCount = getChildCount(); int column = viewCount > 3 ? 3 : viewCount; int gridSize = getWidth()/* == 0 ? screensize.x : getWidth()*/; gridSize -= (getPaddingLeft() - getPaddingRight()); int parentPadding = ((ViewGroup) getParent()).getPaddingLeft(); gridSize -= (parentPadding*2); // Point screen = hs.getScreenSize((Activity) getContext()); // gridSize -= (screen.x - gridSize); for (int i = 0; i < viewCount; i++) { View v = getChildAt(i); GridLayout.LayoutParams itemParams = (GridLayout.LayoutParams) v.getLayoutParams(); gridSize -= (itemParams.rightMargin - itemParams.leftMargin); itemParams.width = (gridSize / column); v.setLayoutParams(itemParams); } } }); }
private GridLayout.LayoutParams getLayoutParamsForField(GridCoordinate coordinateData) { Spec columnSpec = GridLayout.spec(coordinateData.getX(), coordinateData.getWidth()); Spec rowSpec = GridLayout.spec(coordinateData.getY(), coordinateData.getHeight()); GridLayout.LayoutParams gridParams = new GridLayout.LayoutParams(rowSpec, columnSpec); gridParams.width = (int)Math.ceil(cellWidth * coordinateData.getWidth()); gridParams.height = (int)Math.ceil(cellHeight * coordinateData.getHeight()); return gridParams; }
private void initView() { // inflate numpad numpadLayout = (GridLayout) inflate(getContext(), R.layout.view_num_pad, null); addView(numpadLayout); // set icon for the delete button final AppCompatImageButton deleteButton = (AppCompatImageButton) numpadLayout.findViewById(R.id.numpad_delete_btn); final IconicsDrawable deleteIcon = IconUtils.icon(getContext(), GoogleMaterial.Icon.gmd_tag_backspace, R.color.white, 20); deleteButton.setImageDrawable(deleteIcon); // add listeners for (int i = 0; i < numpadLayout.getChildCount(); i++) { numpadLayout.getChildAt(i).setOnClickListener(new NumpadButtonListener()); } }
DonateViewHolder(View view) { super(view); donateHeading = (TextView) view.findViewById(R.id.donate_header); donationOptionsLayout = (GridLayout) view.findViewById(R.id.donation_options); }
public NewEffect(GridLayout container, @DrawableRes int oldImage, @DrawableRes int newImage) { this.mContainer = container; this.mOldImage = oldImage; this.mNewImage = newImage; setContainer(DEFAULT_COLUMN_COUNT, DEFAULT_ROW_COUNT); }
public NewEffect(GridLayout container, View oldView, View newView) { this.mContainer = container; this.mOldView = oldView; this.mNewView = newView; setContainer(DEFAULT_COLUMN_COUNT, DEFAULT_ROW_COUNT); }
protected GridLayoutSubject(FailureStrategy failureStrategy, GridLayout subject) { super(failureStrategy, subject); }