本文整理汇总了Java中de.hdodenhof.circleimageview.CircleImageView类的典型用法代码示例。如果您正苦于以下问题:Java CircleImageView类的具体用法?Java CircleImageView怎么用?Java CircleImageView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CircleImageView类属于de.hdodenhof.circleimageview包,在下文中一共展示了CircleImageView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setRoundCornerDefault
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
/**
* Set the default image for this thread in the action bar.
* */
protected void setRoundCornerDefault(CircleImageView circleImageView, ImageView roundedCornerImageView, View.OnClickListener onClickListener){
circleImageView.setVisibility(View.INVISIBLE);
roundedCornerImageView.setVisibility(View.INVISIBLE);
if (thread.getTypeSafely() == BThread.Type.Public)
roundedCornerImageView.setImageResource(R.drawable.ic_users);
else if (thread.getUsers().size() < 3)
roundedCornerImageView.setImageResource(R.drawable.ic_profile);
else
roundedCornerImageView.setImageResource(R.drawable.ic_users);
roundedCornerImageView.setVisibility(View.VISIBLE);
roundedCornerImageView.bringToFront();
roundedCornerImageView.setOnClickListener(onClickListener);
}
示例2: refreshView
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
private void refreshView(Model model) {
View root = model.tag;
final Author author = model.author;
CircleImageView portrait = (CircleImageView) root.findViewById(R.id.iv_portrait);
TextView name = (TextView) root.findViewById(R.id.tv_name);
ImageView isSelected = (ImageView) root.findViewById(R.id.iv_select);
View line = root.findViewById(R.id.line);
ImageLoader.loadImage(Glide.with(getContext()), portrait, author.getPortrait(), R.mipmap.widget_default_face);
portrait.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
OtherUserHomeActivity.show(v.getContext(), author.getId());
}
});
name.setText(author.getName());
if (model.isSelected) {
isSelected.setVisibility(View.VISIBLE);
} else {
isSelected.setVisibility(View.INVISIBLE);
}
line.setVisibility(View.GONE);
}
示例3: UserHolder
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
public UserHolder(View itemView) {
super(itemView);
photo = (CircleImageView) itemView.findViewById(R.id.new_chat_member_image);
name = (TextView) itemView.findViewById(R.id.new_chat_member_name);
userCheckBox = (AppCompatCheckBox) itemView.findViewById(R.id.new_chat_member_checkbox);
userCheckBox.setOnCheckedChangeListener(
(buttonView, isChecked) -> {
if (isChecked) {
checkedUsers.add(users.get(getAdapterPosition()).getUserId());
name.setTextColor(context.getResources().getColor(R.color.new_chat_member_name_checked));
} else {
checkedUsers.remove(users.get(getAdapterPosition()).getUserId());
name.setTextColor(context.getResources().getColor(R.color.new_chat_member_name));
}
listener.onCheckBoxClick();
});
}
示例4: UserHolder
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
public UserHolder(View itemView) {
super(itemView);
photo = (CircleImageView) itemView.findViewById(R.id.new_chat_member_image);
name = (TextView) itemView.findViewById(R.id.new_chat_member_name);
userCheckBox = (AppCompatCheckBox) itemView.findViewById(R.id.new_chat_member_checkbox);
userCheckBox.setOnCheckedChangeListener(
(buttonView, isChecked) -> {
long userId = users.get(getAdapterPosition()).getUserId();
if (isChecked) {
checkedUsers.add(userId);
name.setTextColor(context.getResources().getColor(R.color.new_chat_member_name_checked));
listener.onCheckBoxClickPush(userId);
} else {
checkedUsers.remove(userId);
name.setTextColor(context.getResources().getColor(R.color.new_chat_member_name));
listener.onCheckBoxClickPull(userId);
}
});
}
示例5: getView
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
@SuppressLint({"ViewHolder", "InflateParams"})
@NonNull
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
LayoutInflater lf = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = lf.inflate(R.layout.spinner_layout, null);
CircleImageView profileImage = (CircleImageView) convertView.findViewById(R.id.profileImage);
TextView name = (TextView) convertView.findViewById(R.id.tV_name),
email = (TextView) convertView.findViewById(R.id.tV_email);
Glide.with(getActivity()).load(users.get(position).getDrawableRes()).dontAnimate().into(profileImage);
name.setText(users.get(position).getName());
email.setText(users.get(position).getEmail());
return convertView;
}
示例6: DialogsHolder
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
public DialogsHolder(View itemView, DialogsRecyclerViewAdapter adapter) {
super(itemView);
this.adapter = adapter;
mLastMessage = (TextView) itemView.findViewById(R.id.chats_item_last_message);
mLastMessageDate = (TextView) itemView.findViewById(R.id.chats_item_last_message_date);
mNewMessageIndicator = (TextView) itemView.findViewById(R.id.new_message_indicator);
mMessageAuthor = (TextView) itemView.findViewById(R.id.chats_item_last_message_author);
imageView = (CircleImageView) itemView.findViewById(R.id.chats_item_chat_image);
mTitle = (TextView) itemView.findViewById(R.id.chats_item_name);
swipeLayout = (SwipeLayout) itemView.findViewById(R.id.chats_item_swipe_layout);
deleteButton = (Button) itemView.findViewById(R.id.chats_item_delete_button);
deleteButton.setOnClickListener(v -> {
//deleteItem();
confirm();
});
surfaceLayout = (RelativeLayout) itemView.findViewById(R.id.chats_item_surface_view);
surfaceLayout.setOnClickListener(v -> {
adapter.onDialogClickCallback.onDialogClick(getAdapterPosition());
});
}
示例7: ComplexButton
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
public ComplexButton(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
LayoutInflater.from(context).inflate(R.layout.complex_button, this);
button = (RelativeLayout) findViewById(R.id.complex_button_body);
rightArrow = (ImageView) findViewById(R.id.complex_button_item_right_arrow);
circleImageView = (CircleImageView) findViewById(R.id.complex_button_item_image);
itemName = (TextView) findViewById(R.id.complex_button_item_name);
detail = (TextView) findViewById(R.id.complex_button_item_detail);
redDot = (ImageView) findViewById(R.id.complex_button_red_dot);
redDot.setVisibility(GONE);
setButtonClickable(true);
button.setLongClickable(true);
button.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
return true;
}
});
selectType(TYPE_IMAGE_ROUND);
}
示例8: renderNeihan
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
private void renderNeihan(BaseViewHolder helper, NeihanItemEntity item) {
CircleImageView avatar = helper.getView(R.id.item_neihan_avatar);
Glide.with(mContext)
.load(item.getAvatar())
.crossFade()
.into(avatar);
helper.setText(R.id.item_neihan_name, item.getName());
helper.setText(R.id.item_neihan_title, item.getTitle());
NiceVideoPlayer videoPlayer = helper.getView(R.id.item_neihan_video);
NeihanVideoPlayerController controller = new NeihanVideoPlayerController(mContext);
controller.setTitle("");
controller.setLenght(item.getDuration());
controller.setClarity(item.getClarityList(), 0);
videoPlayer.setController(controller);
Glide.with(mContext)
.load(item.getThumbnail())
.placeholder(R.drawable.img_default)
.crossFade()
.into(controller.imageView());
}
示例9: convert
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
@Override
protected void convert(BaseViewHolder helper, FriendInfo item) {
CircleImageView profileImg = helper.getView(R.id.friend_profile_list_item);
CircleImageView onlineImg = helper.getView(R.id.online_flag_img);
Utility.loadFriendProfileImg(mContext.getApplicationContext(), item.getUsername(), profileImg);
if (item.isOnline()) {
onlineImg.setVisibility(View.VISIBLE);
onlineImg.setImageResource(R.drawable.green);
} else {
onlineImg.setVisibility(View.INVISIBLE);
}
helper.setText(R.id.friend_name_list_item, item.getUsername());
helper.setText(R.id.friend_des_list_item,
String.format("今日跑步%d次 | 共跑步%d次", item.getNumToday(), item.getNumAll()));
}
示例10: onCreate
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign);
Snackbar.make(getWindow().getDecorView(),"手机验证成功,开始注册",Snackbar.LENGTH_SHORT)
.show();
uname= (EditText) findViewById(R.id.editText3);
upass= (EditText) findViewById(R.id.editText4);
button= (ButtonProgressBar) findViewById(R.id.registerbutton);
imageView= (CircleImageView) findViewById(R.id.sign_image);
Intent intent=getIntent();
phone=intent.getStringExtra("phone");
signimage();
init();
}
示例11: getHeaderView
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
private View getHeaderView() {
View headerView = View.inflate(this.ctx, R.layout.pv, null);
this.tv_username = (TextView) headerView.findViewById(R.id.tv_username);
this.tv_description = (TextView) headerView.findViewById(R.id.tv_description);
this.iv_avatar = (CircleImageView) headerView.findViewById(R.id.iv_avatar);
this.tv_post_count = (TextView) headerView.findViewById(R.id.tv_post_count);
this.tv_diamond_count = (TextView) headerView.findViewById(R.id.tv_diamond_count);
this.tv_diamond_count.setOnClickListener(this);
headerView.findViewById(R.id.tv_diamond_des).setOnClickListener(this);
this.tv_friends_count = (TextView) headerView.findViewById(R.id.tv_friends_count);
this.tv_friends_count.setOnClickListener(this);
headerView.findViewById(R.id.tv_friends_des).setOnClickListener(this);
this.tv_fans_count = (TextView) headerView.findViewById(R.id.tv_fans_count);
this.tv_fans_count.setOnClickListener(this);
headerView.findViewById(R.id.tv_fans_des).setOnClickListener(this);
return headerView;
}
示例12: AuthorView
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
public AuthorView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.author_view, this, true);
avatar = (CircleImageView) findViewById(R.id.avatar);
avatarIcon = (ImageView) findViewById(R.id.avatarIcon);
authorName = (TextView) findViewById(R.id.authorName);
authorNameTypeface = authorName.getTypeface();
date = (TextView) findViewById(R.id.dateView);
trustIndicator = (TrustIndicatorView) findViewById(R.id.trustIndicator);
TypedArray attributes =
context.obtainStyledAttributes(attrs, R.styleable.AuthorView);
int persona = attributes.getInteger(R.styleable.AuthorView_persona, 0);
setPersona(persona);
attributes.recycle();
}
示例13: initView
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
private void initView() {
mRelativeLayout = (RelativeLayout) findViewById(R.id.rl_main);
push_state_ll = (LinearLayout) findViewById(R.id.push_state_ll);
settings = (ImageView) findViewById(R.id.iv_settings);
settings.setOnClickListener(this);
wx_user_name = (TextView) findViewById(R.id.wx_user_name_tv);
wx_user_icon = (CircleImageView) findViewById(R.id.wx_user_icon_iv);
mCountTimeView = (CountTimeView) findViewById(R.id.count_time_view);
mRecorderButton = (ImageView) findViewById(R.id.iv_push);
mRecorderButton.setOnClickListener(this);
btn_pop_pro = (ImageView) findViewById(R.id.btn_pro);
btn_pop_pro.setOnClickListener(this);
btn_pop_talk = (ImageView) findViewById(R.id.btn_talk);
btn_pop_talk.setOnClickListener(this);
mTv_watch_person = (TextView) findViewById(R.id.tv_watch_person);
mRelativeLayout.setOnTouchListener(this);
}
示例14: inject
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
public void inject(Finder finder, final T target, Object source) {
target.avatar = (CircleImageView) finder.castView((View) finder.findRequiredView(source,
R.id.avatar, "field 'avatar'"), R.id.avatar, "field 'avatar'");
target.tvAdviser = (TextView) finder.castView((View) finder.findRequiredView(source, R.id
.tv_adviser, "field 'tvAdviser'"), R.id.tv_adviser, "field 'tvAdviser'");
target.tvWechat = (TextView) finder.castView((View) finder.findRequiredView(source, R.id
.tv_wechat, "field 'tvWechat'"), R.id.tv_wechat, "field 'tvWechat'");
target.viewRefresh = (PullToRefreshListView) finder.castView((View) finder
.findRequiredView(source, R.id.view_refresh, "field 'viewRefresh'"), R.id
.view_refresh, "field 'viewRefresh'");
target.etInput = (EditText) finder.castView((View) finder.findRequiredView(source, R.id
.et_input, "field 'etInput'"), R.id.et_input, "field 'etInput'");
target.viewBottom = (LinearLayout) finder.castView((View) finder.findRequiredView(source,
R.id.view_bottom, "field 'viewBottom'"), R.id.view_bottom, "field 'viewBottom'");
((View) finder.findRequiredView(source, R.id.bt_send, "method 'onClick'"))
.setOnClickListener(new DebouncingOnClickListener() {
public void doClick(View p0) {
target.onClick();
}
});
}
示例15: ViewHolder
import de.hdodenhof.circleimageview.CircleImageView; //导入依赖的package包/类
public ViewHolder(View view) {
super(view);
username= (TextView) view.findViewById(R.id.username);
date= (TextView) view.findViewById(R.id.date);
content= (TextView) view.findViewById(R.id.content);
like= (TextView) view.findViewById(R.id.like);
headview= (CircleImageView) view.findViewById(R.id.icon_image);
likeButton= (LikeButton) view.findViewById(R.id.star_button);
}