当前位置: 首页>>代码示例>>Java>>正文


Java RoundedImageView类代码示例

本文整理汇总了Java中com.makeramen.roundedimageview.RoundedImageView的典型用法代码示例。如果您正苦于以下问题:Java RoundedImageView类的具体用法?Java RoundedImageView怎么用?Java RoundedImageView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RoundedImageView类属于com.makeramen.roundedimageview包,在下文中一共展示了RoundedImageView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: invalidateParams

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
void invalidateParams(){
    stop();
    removeAllViews();
    looper.clear();
    for(int i=0;i<mSize;i++){
        RoundedImageView view = new RoundedImageView(getContext());
        if(i!=0){
            view.setBackgroundResource(R.drawable.drop_shadow);
            view.setPadding(0,0,15,0);
        }
        view.setScaleType(ImageView.ScaleType.FIT_XY);
        view.setCornerRadius((float) 10);
        LayoutParams params = new LayoutParams(mChildWidth, mChildHeight);
        view.setLayoutParams(params);
        addView(view);
        Banner banner = new Banner();
        banner.view = view;
        banner.position = i;
        looper.add(banner);
        view.setTag(i);
        view.setOnClickListener(viewClickListener);
    }
    LogUtil.d(TAG, "invalidateParams");

}
 
开发者ID:teisun,项目名称:SunmiUI,代码行数:26,代码来源:BannerLayout.java

示例2: changeColorElementHistory

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
private void changeColorElementHistory(Element element, boolean sequence){
    int colorBackground = R.drawable.background_catched_element;
    int colorButton = R.color.colorGreen;
    if(sequence){
        colorBackground = R.drawable.background_catched_element_history;
        colorButton = R.color.colorPrimaryText;

        //Toast.makeText(this,element.getHistoryMessage(), Toast.LENGTH_SHORT).show();
        callProfessor(element.getHistoryMessage());
    }

    findViewById(R.id.fragment_element).setBackground(ContextCompat.getDrawable(this, colorBackground));
    findViewById(R.id.name_text).getBackground().setColorFilter(ContextCompat.getColor(this, colorButton), PorterDuff.Mode.SRC_ATOP);
    findViewById(R.id.close_button).getBackground().setColorFilter(ContextCompat.getColor(this, colorButton), PorterDuff.Mode.SRC_ATOP);
    findViewById(R.id.camera_button).getBackground().setColorFilter(ContextCompat.getColor(this, colorButton), PorterDuff.Mode.SRC_ATOP);
    findViewById(R.id.show_element_button).getBackground().setColorFilter(ContextCompat.getColor(this, colorButton), PorterDuff.Mode.SRC_ATOP);
    RoundedImageView imageView = (RoundedImageView)findViewById(R.id.element_image);
    imageView.setBorderColor(ContextCompat.getColor(this,colorButton));
}
 
开发者ID:fga-gpp-mds,项目名称:2016.2-MissaoNascente,代码行数:20,代码来源:MainScreenActivity.java

示例3: setupUser

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
private void setupUser() {
    User user = mSession.getUser();

    RoundedImageView mUserAvatar = (RoundedImageView) mNavigationView.getHeaderView(0).findViewById(R.id.user_avatar);
    TextView mUserNickname = (TextView) mNavigationView.getHeaderView(0).findViewById(R.id.user_nickname);

    if (user == null) {
        mUserAvatar.setImageResource(R.drawable.ic_social_person);
        mUserNickname.setText(getString(R.string.label_please_login_first));
    } else {
        mUserNickname.setText(user.getNickname());
        Picasso
                .with(getActivity())
                .load(user.getAvatar().getLarge())
                .fit()
                .centerCrop()
                .into(mUserAvatar);
    }
}
 
开发者ID:scarletsky,项目名称:Bangumi-Android,代码行数:20,代码来源:DrawerFragment.java

示例4: getView

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
@Override
public View getView(int position, View view, ViewGroup parent) {
    final ViewHolder holder;
    if (view == null) {
        holder = new ViewHolder();
        view = inflater.inflate(R.layout.list_item_people_removed, parent, false);
        holder.personThumbnail = (RoundedImageView) view.findViewById(R.id.person_removed_thumbnail);
        holder.personListName = (TextView) view.findViewById(R.id.person_removed_list_name);
        view.setTag(holder);
    } else {
        holder = (ViewHolder) view.getTag();
    }
    final PersonPOJO person = personManager.getPerson(persons.get(position).getId());
    // thumbnail picture
    Picasso.with(context).load(CommonUtils.getContactUri(person.getId())).placeholder(R.drawable.placeholder_user).fit().into(holder.personThumbnail);
    // person name
    holder.personListName.setText(person.getName());

    return view;
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:21,代码来源:PeopleRemovedSupportFragment.java

示例5: getView

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
@Override
public View getView(int position, View view, ViewGroup parent) {
    final ViewHolder holder;
    if (view == null) {
        holder = new ViewHolder();
        view = inflater.inflate(R.layout.list_item_people_active, parent, false);
        holder.favorite = (IconTextView) view.findViewById(R.id.person_active_favorite);
        holder.favorite.setVisibility(View.GONE);
        holder.personThumbnail = (RoundedImageView) view.findViewById(R.id.person_active_thumbnail);
        holder.personListName = (TextView) view.findViewById(R.id.person_active_list_name);
        view.setTag(holder);
    } else {
        holder = (ViewHolder) view.getTag();
    }
    final PersonPOJO person = personManager.getPerson(persons.get(position).getId());
    // thumbnail picture
    Picasso.with(context).load(CommonUtils.getContactUri(person.getId())).placeholder(R.drawable.placeholder_user).fit().into(holder.personThumbnail);
    // person name
    holder.personListName.setText(person.getName());

    return view;
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:23,代码来源:SearchResultsActivity.java

示例6: ThreadViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
public ThreadViewHolder(View view, OnClickListener listener) {
    super(view);
    title = (TextView) view.findViewById(R.id.sender);
    unread = (TextView) view.findViewById(R.id.unread);
    message = (TextView) view.findViewById(R.id.message);
    date = (TextView) view.findViewById(R.id.date);
    attachment = (RoundedImageView) view.findViewById(R.id.attachment);
    videoLabel = (ImageView) view.findViewById(R.id.video_label);
    card = (ViewGroup) view.findViewById(R.id.card);
    profile = (ImageView) view.findViewById(R.id.profile_image);

    mListener = listener;

    profile.setOnClickListener(this);
    if (attachment != null) {
        attachment.setOnClickListener(this);
    }
    itemView.setOnClickListener(this);
    itemView.setOnLongClickListener(this);
}
 
开发者ID:Xlythe,项目名称:AndroidTextManager,代码行数:21,代码来源:ThreadAdapter.java

示例7: onItemClick

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
/**
 * This method is called when an avatar is selected in the dialog
 *
 * @param adapterView
 * @param view
 * @param position
 * @param id
 */
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
    // avatar selected; enable select button
    mCreatedDialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(true);

    // reset border on previously selected avatar when new one is selected
    if(mSelectedAvatarImageView != null) {
        mSelectedAvatarImageView.setBorderWidth(0.f);
    }

    // use device independent pixels for uniform border width
    float borderWidthDip = TypedValue.applyDimension
            (TypedValue.COMPLEX_UNIT_DIP, 20.f, getContext().getResources().getDisplayMetrics());

    // animate border on currently selected avatar
    RoundedImageView imageView = (RoundedImageView) view;
    ObjectAnimator anim = ObjectAnimator.ofFloat(imageView, "borderWidth", 0f, borderWidthDip);
    anim.setDuration(300);
    anim.setInterpolator(new AccelerateDecelerateInterpolator());
    anim.start();

    int accentColor = ContextCompat.getColor(getContext(), R.color.colorAccent);
    imageView.setBorderColor(accentColor);

    // store selected resource id
    Integer avatarResourceId = Avatars.getAvatarResources()[position];
    mSelectedAvatarEntryName = Avatars.getAvatarResourceName(getContext(), avatarResourceId);
    mSelectedAvatarImageView = imageView;
}
 
开发者ID:andy1729,项目名称:QuizApp,代码行数:38,代码来源:AvatarPickerDialogFragment.java

示例8: ViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
public ViewHolder(View v) {
    super(v);
    cv = (CardView)v.findViewById(R.id.cv);
    setCardButtonOnTouchAnimation(cv);
    img = (RoundedImageView) v.findViewById(R.id.img);
    tv_name = (TextView)v.findViewById(R.id.tv_name);
    tv_dob = (TextView)v.findViewById(R.id.tv_dob);
    btn_select = (Button)v.findViewById(R.id.btn_select);
}
 
开发者ID:pooi,项目名称:Nearby,代码行数:10,代码来源:EmployeeSearchListCustomAdapter.java

示例9: ViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
public ViewHolder(View v) {
    super(v);
    cv = (CardView)v.findViewById(R.id.cv);
    setCardButtonOnTouchAnimation(cv, cv);
    img = (RoundedImageView) v.findViewById(R.id.img);
    tv_name = (TextView)v.findViewById(R.id.tv_name);
    tv_dob = (TextView)v.findViewById(R.id.tv_dob);
    btn_select = (Button)v.findViewById(R.id.btn_select);
    setCardButtonOnTouchAnimation(btn_select, cv);
}
 
开发者ID:pooi,项目名称:Nearby,代码行数:11,代码来源:PatientSearchListCustomAdapter.java

示例10: initNavHeader

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
private void initNavHeader(View view){
    RoundedImageView avatar = (RoundedImageView)view.findViewById(R.id.header_avatar);
    TextView screenNameView = (TextView)view.findViewById(R.id.screen_name);
    TextView userIdView = (TextView)view.findViewById(R.id.user_id);

    Picasso.with(this).load(AppContext.getAvatarUrl()).into(avatar);
    screenNameView.setText(AppContext.getScreenName());
    userIdView.setText("@" + AppContext.getAccount());
}
 
开发者ID:Yuijam,项目名称:droidfan,代码行数:10,代码来源:MainActivity.java

示例11: MessageViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
public MessageViewHolder(View itemView) {
            super(itemView);
            avatar = (RoundedImageView)itemView.findViewById(R.id.iv_avatar);
            username = (TextView)itemView.findViewById(R.id.tv_username);
//            userId = (TextView)itemView.findViewById(R.id.user_id);
            content = (TextView)itemView.findViewById(R.id.tv_content);
        }
 
开发者ID:Yuijam,项目名称:droidfan,代码行数:8,代码来源:ConversationListAdapter.java

示例12: StatusViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
StatusViewHolder(View itemView) {
            super(itemView);
            mAvatar = (RoundedImageView)itemView.findViewById(R.id.iv_avatar);
            mUsername = (TextView)itemView.findViewById(R.id.tv_username);
            mStatusText = (TextView)itemView.findViewById(R.id.tv_status_text);
            mPhotoThumb = (RoundedImageView)itemView.findViewById(R.id.iv_photo_thumbnail);
            mTime = (TextView)itemView.findViewById(R.id.time);
            mItemLayout = (RelativeLayout)itemView.findViewById(R.id.context_item_layout);
//            mReply = (ImageView)itemView.findViewById(R.id.reply);
//            mRetweet = (ImageView)itemView.findViewById(R.id.retweet);
//            mFavorite = (ImageView)itemView.findViewById(R.id.favorite);
//            mMessage = (ImageView)itemView.findViewById(R.id.message);
//            mDelete = (ImageView)itemView.findViewById(R.id.delete);
        }
 
开发者ID:Yuijam,项目名称:droidfan,代码行数:15,代码来源:StatusContextAdapter.java

示例13: StatusViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
public StatusViewHolder(View itemView) {
    super(itemView);
    mAvatar = (RoundedImageView)itemView.findViewById(R.id.iv_avatar);
    mUsername = (TextView)itemView.findViewById(R.id.tv_username);
    mStatusText = (TextView)itemView.findViewById(R.id.tv_status_text);
    mPhotoThumb = (RoundedImageView)itemView.findViewById(R.id.iv_photo_thumbnail);
    mTime = (TextView)itemView.findViewById(R.id.time);
}
 
开发者ID:Yuijam,项目名称:droidfan,代码行数:9,代码来源:StatusAdapter.java

示例14: UserViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
public UserViewHolder(View itemView) {
    super(itemView);
    avatar = (RoundedImageView)itemView.findViewById(R.id.iv_avatar);
    username = (TextView)itemView.findViewById(R.id.tv_username);
    userId = (TextView)itemView.findViewById(R.id.user_id);
    description = (TextView)itemView.findViewById(R.id.description);
}
 
开发者ID:Yuijam,项目名称:droidfan,代码行数:8,代码来源:UsersAdapter.java

示例15: ChatViewHolder

import com.makeramen.roundedimageview.RoundedImageView; //导入依赖的package包/类
public ChatViewHolder(View itemView) {
    super(itemView);
    leftLayout = (LinearLayout)itemView.findViewById(R.id.left_layout);
    rightLayout = (LinearLayout)itemView.findViewById(R.id.right_layout);
    leftText = (TextView)itemView.findViewById(R.id.left_msg);
    rightText = (TextView)itemView.findViewById(R.id.right_msg);
    leftAvatar = (RoundedImageView)itemView.findViewById(R.id.iv_left_avatar);
    rightAvatar = (RoundedImageView)itemView.findViewById(R.id.iv_right_avatar);
}
 
开发者ID:Yuijam,项目名称:droidfan,代码行数:10,代码来源:ChatAdapter.java


注:本文中的com.makeramen.roundedimageview.RoundedImageView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。