/** * Set the size of emojicon in pixels. */ public void setEmojiconSize(int pixels) { mEmojiconSize = pixels; super.setText(getText()); }
@Override public View getDropDownView(int position, View convertView, ViewGroup parent) { AppCompatTextView ret = new AppCompatTextView(parent.getContext()); ret.setText(displayText[position]); ret.setTextSize(16); ret.setPadding(0, 10, 0, 10); ret.setTextColor(Color.BLACK); return ret; }
@Override public void setText(CharSequence text, BufferType type) { super.setText(text, type); if (loaderController != null) { loaderController.stopLoading(); } }
@Override public View getView(int position, View convertView, ViewGroup parent) { AppCompatTextView ret = new AppCompatTextView(parent.getContext()); ret.setText(displayText[position]); ret.setTextSize(16); ret.setPadding(0, 10, 0, 10); ret.setTextColor(Color.BLACK); return ret; }
@Override public void setText(CharSequence text, BufferType type) { if (!TextUtils.isEmpty(text)) { SpannableStringBuilder builder = new SpannableStringBuilder(text); EmojiconHandler.addEmojis(getContext(), builder, mEmojiconSize, mEmojiconAlignment, mEmojiconTextSize, mTextStart, mTextLength, mUseSystemDefault); text = builder; } super.setText(text, type); }
public void resetLoader() { if (!TextUtils.isEmpty(getText())) { super.setText(null); loaderController.startLoading(); } }
@Override public void setText(CharSequence text, BufferType type) { mDefaultText = text; super.setText("", type); }
@Override public void onClick(View v) { generatePassword(); passwordView.setText(password); } });
@Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { CategoryViewHolder categoryViewHolder = (CategoryViewHolder) holder; ArticleDetailData data = list.get(position); categoryViewHolder.textAuthor.setText(data.getAuthor()); categoryViewHolder.textTitle.setText(StringUtil.replaceInvalidChar(data.getTitle())); }
@Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { NormalViewHolder normalViewHolder = (NormalViewHolder) holder; FavoriteArticleDetailData data = mList.get(position); normalViewHolder.textAuthor.setText(data.getAuthor()); normalViewHolder.textTitle.setText(StringUtil.replaceInvalidChar(data.getTitle())); //if the text is too long, the button can not show it correctly.The solution is adding " ". normalViewHolder.btnCategory.setText(" "+data.getChapterName()+" "); normalViewHolder.textTime.setText(data.getNiceDate()); }
public void bind(@NonNull File file, boolean isMultiChoiceModeEnabled, boolean isSelected, @Nullable OnListItemClickListener listener) { setOnListItemClickListener(listener); mFileName.setText(file.getName()); mCheckBox.setVisibility(isMultiChoiceModeEnabled ? View.VISIBLE : View.GONE); mCheckBox.setChecked(isSelected); }
public void configureWithAccount(Account account, int index) { this.type = SimpleListViewType.SimpleListViewTypeAccount; ((AppCompatTextView) itemView.findViewById(R.id.account_name)).setText(account.getName()); Picasso.with(itemView.getContext()).load(ResUtil.getInstance(itemView.getContext().getApplicationContext()).getBmpUri(account.getIcon())) .fit() .config(Bitmap.Config.RGB_565) .into((ImageView) itemView.findViewById(R.id.account_image)); this.index = index; }
public void configureWithCategory(Category category, int index) { this.type = SimpleListViewType.SimpleListViewTypeCategory; ((AppCompatTextView) itemView.findViewById(R.id.account_name)).setText(category.getName()); Picasso.with(itemView.getContext()).load(ResUtil.getInstance(itemView.getContext().getApplicationContext()).getBmpUri(category.getIcon())) .fit() .config(Bitmap.Config.RGB_565) .into((ImageView) itemView.findViewById(R.id.account_image)); this.index = index; }
public void handleExpandAction(View view) { if (binding.includedLayout.expandableLayout.isExpanded()) { binding.expandButton.setText(getString(R.string.read_more)); binding.includedLayout.expandableLayout.collapse(); } else { binding.expandButton.setText(getString(R.string.read_less)); binding.includedLayout.expandableLayout.expand(); } } }
public void bind(@Nullable OnListItemClickListener listener) { setOnListItemClickListener(listener); mFileName.setText(".."); mCheckBox.setVisibility(View.GONE); if (mFileSize != null) { mFileSize.setVisibility(View.GONE); } mThumbnail.setImageResource(R.drawable.efp__ic_up); }
@Override public void setText(CharSequence text, BufferType type) { if (isNull(text)) { setVisibility(GONE); } else { setVisibility(VISIBLE); super.setText(text, type); } } }
private void updateMovieDetailView(MovieEntity movie) { binding.movieTitle.setText(movie.getHeader()); binding.movieDesc.setText(movie.getDescription()); if(movie.getStatus() != null) binding.movieStatus.setItems(Arrays.asList(new String[]{ movie.getStatus() })); binding.collectionItemPicker.setUseRandomColor(true); if(movie.getGenres() != null) binding.collectionItemPicker.setItems(AppUtils.getGenres(movie.getGenres())); binding.txtRuntime.setText(AppUtils.getRunTimeInMins(movie.getStatus(), movie.getRuntime(), movie.getReleaseDate())); }
@Override public void onBindViewHolder(ViewHolder holder, int position) { Task task = mTasks.get(position); holder.taskNameText.setChecked(task.isCompleted()); holder.taskNameText.setText(task.getName()); changeTaskNameState(holder.itemView, holder.taskNameText, task.isCompleted()); holder.taskGroupText.setText(task.getGroupName()); }