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


Java CropCircleTransformation类代码示例

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


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

示例1: onBindItemViewHolder

import jp.wasabeef.picasso.transformations.CropCircleTransformation; //导入依赖的package包/类
@Override
        protected void onBindItemViewHolder(PostAnswersHolder holder, PostAnswers.AnswersEntity answersEntity, int position) {
            holder.mTvQuestion.setText(answersEntity.getTitle());
//            holder.mTvQuestion.setOnClickListener(v2 -> WebActivity.startActivity(holder.mTvQuestion.getContext(), "https://www.zhihu.com/question/" + answersEntity.getQuestionid()));
            holder.mTvQuestion.setOnClickListener(v ->
                    ZhiHuIntent.starZhiHuQuestionActivity(holder.mTvQuestion.getContext(), answersEntity.getQuestionid())
            );
            Picasso.with(holder.mIvAvatar.getContext()).load(answersEntity.getAvatar()).transform(new CropCircleTransformation()).into(holder.mIvAvatar);
            holder.mTvAnswer.setText(answersEntity.getSummary());
//            holder.mTvAnswer.setOnClickListener(v1 -> WebActivity.startActivity(holder.mTvAnswer.getContext(), "https://www.zhihu.com/question/" + answersEntity.getQuestionid() + "/answer/" + answersEntity.getAnswerid()));
            holder.mTvAnswer.setOnClickListener(v1 -> WebActivity.startActivity(holder.mTvAnswer.getContext(), "http://www.kanzhihu.com/"));
//            holder.mTvAnswer.setOnClickListener(v ->
//                    ZhiHuIntent.starZhiHuAnswernActivity(holder.mTvAnswer.getContext(), answersEntity.getQuestionid(), answersEntity.getAnswerid())
//            );

            holder.mTvAuthorname.setText(answersEntity.getAuthorname());
//            holder.mGroupUser.setOnClickListener(v -> WebActivity.startActivity(holder.mGroupUser.getContext(), "https://www.zhihu.com/people/" + answersEntity.getAuthorhash()));
        }
 
开发者ID:MaYunFei,项目名称:kanzhihu,代码行数:19,代码来源:PostAnswersActivity.java

示例2: onBindViewHolder

import jp.wasabeef.picasso.transformations.CropCircleTransformation; //导入依赖的package包/类
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
    final Trace trace = traceList.get(position);
    final TraceViewHolder traceHolder = (TraceViewHolder)holder;

    // 리뷰정보 표시
    Picasso.with(traceHolder.userProfileView.getContext()).load(trace.getUserImageUrl()).transform(new CropCircleTransformation()).into(traceHolder.userProfileView);
    traceHolder.userNameView.setText(trace.getUserName());
    Picasso.with(traceHolder.imgView.getContext()).load(trace.getImageURL()).into(traceHolder.imgView);
    traceHolder.contentView.setText(trace.getContent());
    traceHolder.dateView.setText(MixUtils.getDateString(trace.getWriteDate()));
    traceHolder.likeNumberView.setText(String.valueOf(trace.getLikeNum()));

    clientSelector.getTraceLikeInformation(trace, this, traceHolder); // 처음 좋아요 정보 가져오기
    traceHolder.likeWrapper.setOnClickListener(new View.OnClickListener() { // 좋아요 버튼 클릭시 처리되는 함수
        @Override
        public void onClick(View view) {
            traceHolder.isLikeClicked = !traceHolder.isLikeClicked;
            setLike(traceHolder);
            traceHolder.likeNumberView.setText(String.valueOf(Integer.parseInt(traceHolder.likeNumberView.getText().toString()) + (traceHolder.isLikeClicked ? 1 : -1)));
            clientSelector.sendTraceLikeToServer(traceHolder.isLikeClicked, trace);
        }
    });
}
 
开发者ID:siosio34,项目名称:AR-Trace,代码行数:25,代码来源:TraceRecyclerViewAdapter.java

示例3: onCreateView

import jp.wasabeef.picasso.transformations.CropCircleTransformation; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.fragment_profile, container, false);
    ButterKnife.bind(this, view);

    Picasso.with(view.getContext()).load(user.getAvatarUrl()).transform(new CropCircleTransformation()).error(R.mipmap.octocat).into(profileImage);
    Picasso.with(view.getContext()).load(PATH_IMAGE_GIT).transform(new CropCircleTransformation()).error(R.mipmap.octocat).into(imageGit);
    profileName.setText(user.getName());

    return view;
}
 
开发者ID:llvieira,项目名称:GHCli,代码行数:13,代码来源:ProfileFragment.java

示例4: loadImageWithTransformationLibrary

import jp.wasabeef.picasso.transformations.CropCircleTransformation; //导入依赖的package包/类
private void loadImageWithTransformationLibrary() {
    int color = Color.parseColor("#339b59b6");

    Picasso
            .with(context)
            .load(UsageExampleListView.eatFoodyImages[0])
            .transform(new ColorFilterTransformation(color))
            .transform(new CropCircleTransformation())
            .into(imageViewTransformationLibrary);
}
 
开发者ID:fs-opensource,项目名称:android-tutorials-picasso,代码行数:11,代码来源:UsageExampleRotationTransformation.java

示例5: onCreate

import jp.wasabeef.picasso.transformations.CropCircleTransformation; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    networkUtilities = new NetworkUtilities(this);
    setContentView(R.layout.activity_pic_detail);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_detail);
    tag_title=(TextView)findViewById(R.id.toolbar_title);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    permissionCheck1 = ContextCompat.checkSelfPermission(this,
            Manifest.permission.WRITE_EXTERNAL_STORAGE);

    if (getIntent().hasExtra(EXTRA_PIC)) {
        hit = getIntent().getParcelableExtra(EXTRA_PIC);
    } else {
        throw new IllegalArgumentException("Detail activity must receive a Hit parcelable");
    }
    title=hit.getTags();
    while(title.contains(",")){
        String f=title.substring(0,title.indexOf(","));
        tags.add(f);
        first=title.indexOf(",");
        title=title.substring(++first);
    }
    tags.add(title);
    tag_title.setText(tags.get(0));
    wallp = (ImageView) findViewById(R.id.wallpaper_detail);
    fav=(TextView)findViewById(R.id.fav);
    user_id=(TextView)findViewById(R.id.user_name);
    user_image=(ImageView)findViewById(R.id.user_image);
    downloads=(TextView)findViewById(R.id.down);
    recyclerView=(RecyclerView)findViewById(R.id.tagsRv);
    recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
    tagAdapter= new TagAdapter(this);
    tagAdapter.setTagList(tags);
    recyclerView.setAdapter(tagAdapter);
    file = new File(Environment.getExternalStoragePublicDirectory("/"+getResources().getString(R.string.app_name)), hit.getId() + getResources().getString(R.string.jpg));
    if(getIntent().hasExtra(origin)){

        Picasso.with(this)
                .load(file)
                .placeholder(R.drawable.plh)
                .into(wallp);
        isCallerCollection=true;
    }
    else {
        Picasso.with(this)
                .load(hit.getWebformatURL())
                .placeholder(R.drawable.plh)
                .into(wallp);
    }
    user_id.setText(hit.getUser());
    downloads.setText(String.valueOf(hit.getDownloads()));
    fav.setText(String.valueOf(hit.getFavorites()));
    if(!networkUtilities.isInternetConnectionPresent()){
        Picasso.with(this)
                .load(R.drawable.memb)
                .transform(new CropCircleTransformation())
                .into(user_image);
    }
    else {
        if (!hit.getUserImageURL().isEmpty()) {
            Picasso.with(this)
                    .load(hit.getUserImageURL())
                    .transform(new CropCircleTransformation())
                    .into(user_image);
        } else {
            Picasso.with(this)
                    .load(R.drawable.memb)
                    .transform(new CropCircleTransformation())
                    .into(user_image);
        }
    }
    IntentFilter filter = new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE);
    registerReceiver(downloadReceiver, filter);
}
 
开发者ID:MuditSrivastava,项目名称:Canvas-Vision,代码行数:77,代码来源:PicDetail.java

示例6: getPicassoRounded

import jp.wasabeef.picasso.transformations.CropCircleTransformation; //导入依赖的package包/类
public static RequestCreator getPicassoRounded(RequestCreator request) {
    final Transformation transformation = new CropCircleTransformation();
    request.transform(transformation);
    return request;
}
 
开发者ID:pvarry,项目名称:intra42,代码行数:6,代码来源:UserImage.java

示例7: init

import jp.wasabeef.picasso.transformations.CropCircleTransformation; //导入依赖的package包/类
public void init(){

        if (isInEditMode()) return;


        //inject dagger
        Application.get(getContext()).inject(this);


        //default image background
        this.defaultBackground = new ColorDrawable(Color.LTGRAY);

        //circle image transformation
        this.cropCircleTransformation = new CropCircleTransformation();

        setAdjustViewBounds(true);
    }
 
开发者ID:ArthurSav,项目名称:paradise,代码行数:18,代码来源:UrlImageView.java


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