本文整理汇总了Java中com.makeramen.RoundedImageView类的典型用法代码示例。如果您正苦于以下问题:Java RoundedImageView类的具体用法?Java RoundedImageView怎么用?Java RoundedImageView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoundedImageView类属于com.makeramen包,在下文中一共展示了RoundedImageView类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addColor
import com.makeramen.RoundedImageView; //导入依赖的package包/类
void addColor(String color_code, String color_name){
if(color_1.getVisibility() != View.VISIBLE){
pickedColors.put(color_1, new ColorPicker(color_code, color_name));
color_1.setBackgroundColor(Color.parseColor(color_code));
((RoundedImageView)color_1).setImageResource(Color.parseColor(color_code));
color_1.setVisibility(View.VISIBLE);
setVisibilityAnimation(color_1);
Log.e(LOG_TAG, "color_1 empty! adding new color "+color_code);
}else if(color_2.getVisibility() != View.VISIBLE){
pickedColors.put(color_2, new ColorPicker(color_code, color_name));
color_2.setBackgroundColor(Color.parseColor(color_code));
((RoundedImageView)color_2).setImageResource(Color.parseColor(color_code));
color_2.setVisibility(View.VISIBLE);
setVisibilityAnimation(color_2);
Log.e(LOG_TAG, "color_2 empty! adding new color "+color_code);
}
}
开发者ID:BitCypher2014,项目名称:Wardrobe_app,代码行数:18,代码来源:StepOneFragment.java
示例2: onViewCreated
import com.makeramen.RoundedImageView; //导入依赖的package包/类
@Override
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
setHasOptionsMenu(true);
mHeaderBackground = view.findViewById(R.id.user_profile_header_background);
mUsernameTextView = (TextView) view.findViewById(R.id.header_user_name);
mTagTextView = (TextView) view.findViewById(R.id.header_user_stuff);
mAvatar = (RoundedImageView) view.findViewById(R.id.avatar);
CompatUtils.setBackground(mAvatar, new ColorDrawable(getResources()
.getColor(android.R.color.white)));
mPhotoViewContainer = view.findViewById(R.id.session_photo_container);
mPhotoView = (ImageView) view.findViewById(R.id.session_photo);
mHeaderContent = view.findViewById(R.id.header_user_profile_content);
final ViewPager viewPager = (ViewPager) view.findViewById(R.id.forum_view_pager);
viewPager.setAdapter(mAdapter);
viewPager.setOffscreenPageLimit(10);
// final ActionBar actionBar = UIUtils.getSupportActionBar(getActivity());
// actionBar.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
mSlidingTabLayout = (TabLayout) view.findViewById(R.id.fragment_sliding_tab_layout);
mSlidingTabLayout.setSelectedIndicatorColors(Color.WHITE);
mSlidingTabLayout.setViewPager(viewPager);
mSlidingTabLayout.setOnPageChangeListener(new PageChangeListener(viewPager));
}
开发者ID:xda,项目名称:XDA-One,代码行数:32,代码来源:UserProfileFragment.java
示例3: getView
import com.makeramen.RoundedImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
UserViewHolder holder = null;
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.nearby_item, parent, false);
holder = new UserViewHolder();
holder.avatar = (RoundedImageView) convertView.findViewById(R.id.avatar);
// holder.avatar.setCornerRadius(5);
holder.avatar.setOval(true);
holder.avatar.setOnClickListener(onPictureClick);
holder.distance = (TextView) convertView.findViewById(R.id.distance);
holder.name = (TextView) convertView.findViewById(R.id.name);
convertView.setTag(holder);
} else {
holder = (UserViewHolder) convertView.getTag();
}
NearbyUserHolder userHolder = getItem(position);
holder.avatar.setImageDrawable(null);
holder.avatar.setTag(userHolder.id);
holder.name.setText(userHolder.name);
holder.distance.setText(userHolder.distance);
holders.put(position, holder);
return convertView;
}
开发者ID:DobrinAlexandru,项目名称:Wabbit-Messenger---android-client,代码行数:32,代码来源:UsersListAdapter.java
示例4: getView
import com.makeramen.RoundedImageView; //导入依赖的package包/类
@Override
public View getView(int position, View view, ViewGroup parent) {
Account account = getItem(position);
if (view == null) {
LayoutInflater inflater = (LayoutInflater) getContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(R.layout.account_row, parent, false);
}
TextView jid = (TextView) view.findViewById(R.id.account_jid);
//jid.setText(account.getJid().toBareJid().toString()); //Original
jid.setText(account.getJid().toPin()); //TXTR CUSTOM
TextView statusView = (TextView) view.findViewById(R.id.account_status);
RoundedImageView imageView = (RoundedImageView) view.findViewById(R.id.account_image);
imageView.setImageBitmap(activity.avatarService().get(account,
activity.getPixel(48)));
statusView.setText(getContext().getString(account.getStatus().getReadableId()));
switch (account.getStatus()) {
case ONLINE:
statusView.setTextColor(activity.getPrimaryColor());
break;
case DISABLED:
case CONNECTING:
statusView.setTextColor(activity.getSecondaryTextColor());
break;
default:
statusView.setTextColor(activity.getWarningTextColor());
break;
}
return view;
}
开发者ID:juanignaciomolina,项目名称:txtr,代码行数:31,代码来源:AccountAdapter.java
示例5: modifyColor
import com.makeramen.RoundedImageView; //导入依赖的package包/类
void modifyColor(View view, ColorPicker colorPicker){
pickedColors.put(view, colorPicker);
view.setBackgroundColor(Color.parseColor(colorPicker.getColorCode()));
((RoundedImageView)view).setImageResource(Color.parseColor(colorPicker.getColorCode()));
MODIFY_COLOR_VIEW = ADD_COLOR;
}
开发者ID:BitCypher2014,项目名称:Wardrobe_app,代码行数:7,代码来源:StepOneFragment.java
示例6: getView
import com.makeramen.RoundedImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
MessageViewHolder holder = null;
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.message_item, parent, false);
holder = new MessageViewHolder();
holder.left = (RelativeLayout) convertView.findViewById(R.id.received);
holder.right = (RelativeLayout) convertView.findViewById(R.id.sent);
holder.leftImg = (RoundedImageView) convertView.findViewById(R.id.avatar_left);
// holder.leftImg.setCornerRadius(5);
holder.leftImg.setOval(true);
// holder.rightImg = (RoundedImageView) convertView.findViewById(R.id.avatar_right);
// holder.rightImg.setCornerRadius(5);
holder.leftText = (TextView) convertView.findViewById(R.id.text_body_left);
holder.rightText = (TextView) convertView.findViewById(R.id.text_body_right);
convertView.setTag(holder);
} else {
holder = (MessageViewHolder) convertView.getTag();
}
currentItem = getItem(position);
//Manage sent & received message style
if(currentItem.isSent()) {
holder.right.setVisibility(View.VISIBLE);
holder.left.setVisibility(View.GONE);
holder.rightText.setText(currentItem.getText());
// holder.rightImg.setImageDrawable(null);
holder.sent = true;
if(currentItem.hasTemporaryId()){
holder.rightText.setTextColor(0xFFC9C9C9);
ViewHelper.setScaleX(holder.right, 0.8f);
ViewHelper.setScaleY(holder.right, 0.8f);
}
else{
ViewHelper.setScaleX(holder.right, 1f);
ViewHelper.setScaleY(holder.right, 1f);
holder.rightText.setTextColor(0xFFFFFFFF);
}
}
else{
holder.left.setVisibility(View.VISIBLE);
holder.right.setVisibility(View.GONE);
holder.leftText.setText(currentItem.getText());
holder.leftImg.setImageDrawable(null);
holder.sent = false;
}
holders.put(position, holder);
return convertView;
}
开发者ID:DobrinAlexandru,项目名称:Wabbit-Messenger---android-client,代码行数:56,代码来源:MessagesListAdapter.java
示例7: getImg
import com.makeramen.RoundedImageView; //导入依赖的package包/类
public RoundedImageView getImg(){
// if(sent)
// return rightImg;
return leftImg;
}
开发者ID:DobrinAlexandru,项目名称:Wabbit-Messenger---android-client,代码行数:6,代码来源:MessagesListAdapter.java
示例8: getView
import com.makeramen.RoundedImageView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
RecentViewHolder holder = null;
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.recent_item, parent, false);
holder = new RecentViewHolder();
holder.avatar = (RoundedImageView) convertView.findViewById(R.id.avatar);
// holder.avatar.setCornerRadius(5);
holder.avatar.setOval(true);
holder.avatar.setOnClickListener(onPictureClick);
holder.lastMsg = (TextView) convertView.findViewById(R.id.last_msg);
holder.name = (TextView) convertView.findViewById(R.id.name);
holder.time = (TextView) convertView.findViewById(R.id.time);
convertView.setTag(holder);
} else {
holder = (RecentViewHolder) convertView.getTag();
}
final Recent recent = getItem(position);
final ParseUser user = ParseMemCache.gi().getUser(recent.userId, false);
String userName = ". . .";
if(user != null)
userName = user.getString(Enums.ParseKey.USER_NAME);
//If unread messages
if(recent.lastMsgRead == false){
holder.lastMsg.setTypeface(null, Typeface.BOLD);
holder.lastMsg.setTextColor(Color.BLACK);
holder.name.setTypeface(null, Typeface.BOLD);
}else{
holder.lastMsg.setTypeface(null, Typeface.NORMAL);
holder.lastMsg.setTextColor(0xFFAAAAAA);
holder.name.setTypeface(null, Typeface.NORMAL);
}
holder.avatar.setImageDrawable(null);
holder.avatar.setTag(recent.userId);
holder.lastMsg.setText(recent.lastMsgText);
holder.name.setText(userName);
String time = getTime(recent.lastMsgTime);
holder.time.setText(time);
holders.put(position, holder);
return convertView;
}
开发者ID:DobrinAlexandru,项目名称:Wabbit-Messenger---android-client,代码行数:48,代码来源:RecentListAdapter.java
注:本文中的com.makeramen.RoundedImageView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论