• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BlurTransformation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setupBackground

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
private void setupBackground(Transformation type) {
    if (anime.coverURL == null || anime.coverURL.isEmpty()) {
        KitsuApi.getInstance().fetchCoverUrl(anime.title);
    } else {
        if (type.equals(Transformation.BW)) {
            Picasso.with(this).load(anime.coverURL)
                    .fit()
                    .centerCrop()
                    .transform(new BlurTransformation(this))
                    .transform(new GrayscaleTransformation())
                    .into(cover);
        } else {
            Picasso.with(this).load(anime.coverURL)
                    .fit()
                    .centerCrop()
                    .transform(new BlurTransformation(this))
                    .into(cover);
        }
    }
}
 
开发者ID:daose,项目名称:KSAnime,代码行数:21,代码来源:AnimeActivity.java


示例2: loadFullSizeImage

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
/**
 * Load the item's full-size image into our {@link ImageView}.
 */
private void loadFullSizeImage() {
    Context context = MovieDetailActivity.this;
    String postLarge = mMovie.getImages().getLarge();
    Picasso.with(context)
            .load(postLarge)
            .resize(200, 100)
            .centerCrop()
            .transform(new BlurTransformation(context, 5, 2))
            .into(mActivityMovieDetailBinding.ivBackdrop);
    Picasso.with(context)
            .load(postLarge)
            .noFade()
            .noPlaceholder()
            .into(mActivityMovieDetailBinding.ivPoster);
}
 
开发者ID:CrazyOrr,项目名称:NewMoviesExpress,代码行数:19,代码来源:MovieDetailActivity.java


示例3: drawVerseImage

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
private void drawVerseImage() {
    List<Transformation> transformations = new ArrayList<>();

    transformations.add(new BlurTransformation(getActivity(), 25, 4));

    Picasso.with(getActivity()).load(R.drawable.at_the_beach)
            .fit()
            .centerCrop()
            .into(verseImage);

    Picasso.with(getActivity()).load(R.drawable.at_the_beach)
            .fit()
            .centerCrop()
            .transform(transformations)
            .into(verseImageReflection);
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:17,代码来源:HTFDemoScriptureFragment.java


示例4: setDynamicImage

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
public static void setDynamicImage(Context context, ImageView target) {
    File currentBackgroundImage = new File(context.getCacheDir(), Constants.CURRENT_BACKGROUND_IMAGE);
    List<Transformation> transformations = new ArrayList<>();
    transformations.add(new BlurTransformation(context, 25, 4));

    if (currentBackgroundImage.exists()) {
        Picasso.with(context).load(currentBackgroundImage)
                .placeholder(R.drawable.placeholder_rectangle_scene)
                .fit()
                .centerCrop()
                .transform(transformations)
                .into(target);
    } else {
        Picasso.with(context).load(R.drawable.at_the_beach)
                .placeholder(R.drawable.placeholder_rectangle_scene)
                .fit()
                .centerCrop()
                .transform(transformations)
                .into(target);
    }
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:22,代码来源:CommonUtils.java


示例5: setupBackgroundImage

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
public static void setupBackgroundImage(Context context, ImageView target) {
    File currentBackgroundImage = new File(context.getCacheDir(), Constants.CURRENT_BACKGROUND_IMAGE);
    if (currentBackgroundImage.exists()) {
        Picasso.with(context)
                .load(currentBackgroundImage)
                .transform(new BlurTransformation(context, 25, 3))
                .into(target);
        Log.d(TAG, "Background image has been set to " + currentBackgroundImage);
    } else {
        Log.d(TAG, "Showing default background image");
        Picasso.with(context)
                .load(R.drawable.at_the_beach)
                .transform(new BlurTransformation(context, 25, 3))
                .into(target);
    }
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:17,代码来源:CommonUtils.java


示例6: loadImage

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
@Override
public void loadImage(String url,final ImageView imageView) {

    Picasso.with(imageView.getContext()).load(url).transform(new Transformation() {
        @Override
        public Bitmap transform(Bitmap source) {
            Bitmap combinedBitmap;
            combinedBitmap = Bitmap.createBitmap(source.getWidth(), source.getHeight() / 3 + source.getHeight(), source.getConfig());

            Canvas combinedCanvas = new Canvas(combinedBitmap);
            combinedCanvas.drawBitmap(source, 0f, 0f, null);

            Matrix matrix = new Matrix();
            matrix.postRotate(180);
            matrix.preScale(-1, 1);
            matrix.postTranslate(0, source.getHeight() * 2);

            BlurTransformation blurTransformation = new BlurTransformation(imageView.getContext(), 15, 1);
            Bitmap bottom = blurTransformation.transform(source);

            combinedCanvas.setMatrix(matrix);
            combinedCanvas.drawBitmap(bottom, 0f, 0f, null);
            return combinedBitmap;
        }

        @Override
        public String key() {
            return ImageLoader.class.getName() + ".Transformation";
        }
    }).error(android.R.drawable.sym_contact_card).placeholder(android.R.drawable.sym_contact_card).
            into(imageView);
}
 
开发者ID:shelajev,项目名称:Retrofit2SampleApp,代码行数:33,代码来源:ImageLoader.java


示例7: drawVerseImage

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
private void drawVerseImage() {
    File currentBackgroundImage = new File(getActivity().getCacheDir(), Constants.CURRENT_BACKGROUND_IMAGE);
    List<Transformation> transformations = new ArrayList<>();
    transformations.add(new BlurTransformation(getActivity(), 25, 4));

    if (currentBackgroundImage.exists()) {
        Log.d(TAG, "Showing verse image");

        Picasso.with(getActivity()).load(currentBackgroundImage)
                .fit()
                .centerCrop()
                .into(verseImage);

        Picasso.with(getActivity()).load(currentBackgroundImage)
                .fit()
                .centerCrop()
                .transform(transformations)
                .into(verseImageReflection);
    } else {
        Log.d(TAG, "Showing default verse image");
        Picasso.with(getActivity()).load(R.drawable.at_the_beach)
                .fit()
                .centerCrop()
                .into(verseImage);

        Picasso.with(getActivity()).load(R.drawable.at_the_beach)
                .fit()
                .centerCrop()
                .transform(transformations)
                .into(verseImageReflection);
    }
}
 
开发者ID:ceaseless-prayer,项目名称:CeaselessAndroid,代码行数:33,代码来源:ScriptureCardSupportFragment.java


示例8: remplir

import jp.wasabeef.picasso.transformations.BlurTransformation; //导入依赖的package包/类
@Override
protected void remplir() {

    isVF.setVisibility(View.GONE);
    is2D.setVisibility(View.GONE);
    is3D.setVisibility(View.GONE);
    isVO.setVisibility(View.GONE);

    if (movie != null) {
        String poster = this.movie.getUrlPoster(getActivity().getResources().getInteger(R.integer.fragment_movie_fond_blur_height));

        if (poster != null) {
            Picasso.with(getActivity()).load(poster).transform(new BlurTransformation(getContext(), 10)).into(imageFond);

            imagesUrl.add(this.movie.getUrlPoster(getActivity().getResources().getInteger(R.integer.fragment_movie_fond_height)));

            //Picasso.with(getActivity()).load(this.moviePoster).into(imageFond);
            Picasso.with(getActivity())
                    .load(this.movie.getUrlPoster(getActivity().getResources().getInteger(R.integer.fragment_movie_poster_height)))
                    .into(imagePoster);
        }
        imagesAdapter = new ImagesPagerAdapter(getChildFragmentManager(), imagesUrl);

        viewPager.setAdapter(imagesAdapter);

        viewPager.setPageTransformer(false, new ParallaxTransformer(R.id.parallaxContent));

        chargerRating();

        if (movie.getTitle() != null)
            titre.setText(movie.getTitle());


        Analytics.screen("movie_" + movie.getTitle());


        duree.setText(movie.getDuree());
        genre.setText(movie.getGenres());

        if (movie.getOriginalTitle() != null && !(movie.sameTitleAndOrignlalTitle())) {
            ((TextView) titreOriginal.findViewById(R.id.text)).setText(movie.getOriginalTitle());
        } else {
            titreOriginal.setVisibility(View.GONE);
        }

        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
        try {
            Date date1 = sdf.parse(movie.getRelease().getReleaseDate());
            Date date2 = new Date();

            if (date1.before(date2)) {
                ((TextView) dateDeSortie.findViewById(R.id.text)).setText(movie.getRelease().getReleaseDate());
            } else
                dateDeSortie.setVisibility(View.GONE);

        } catch (Exception e) {
            Log.e("Erreur date", e.toString());
            dateDeSortie.setVisibility(View.GONE);
        }


        if (movie.getSynopsisShort() != null)
            synopsis.setText(movie.getSynopsisShort(), true);

        doubleProgress.setValeurHaut(movie.getUserRating());
        doubleProgress.setValeurBas(movie.getPressRating());
        doubleProgress.animer();

        if (movie.getHasShowtime() == null || movie.getHasShowtime() != 1) {
            this.findViewById(R.id.horrairesIci).setVisibility(View.GONE);
        }
    }
}
 
开发者ID:florent37,项目名称:OCiney,代码行数:74,代码来源:MovieFragment.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SftpClient类代码示例发布时间:2022-05-23
下一篇:
Java NavigationTabStrip类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap