相关疑难解决方法(0)

ImageView循环通过xml

我想把我的任何图像ImageView变成带边框的圆形.

我搜索但找不到任何有用的信息(我试过的任何东西都不起作用).

我如何通过xml实现这一点:ImageView使用某个src 创建一个并使其带边框的圆形?

xml android imageview

180
推荐指数
14
解决办法
39万
查看次数

如何用Glide库舍入图像?

所以,有人知道如何使用Glide显示带圆角的图像吗?我正在使用Glide加载图像,但我不知道如何将舍入的参数传递给此库.

我需要显示图像如下例子:

在此输入图像描述

android android-glide

174
推荐指数
11
解决办法
13万
查看次数

如何在Android上的textview或imageview上设置涟漪效果?

我想在Android Studio中对textview和imageview设置涟漪效果.我该怎么做?

android textview android-imageview material-design

112
推荐指数
11
解决办法
8万
查看次数

如何使ImageView成圆形?

我想做那样的事.

列表视图中的图像

这是一个列表视图行,其中包含名称和用户图像.

我做了一些搜索并完成了图像循环,但不是完美的解决方案.任何帮助都会帮助我.

我的代码添加到Image Loader类

public Bitmap processBitmap(Bitmap bitmap) {
    int pixels = 0;
    if (mRound == 0)
        pixels = 120;
    else
        pixels = mRound;
    Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
            bitmap.getHeight(), Config.ARGB_8888);
    Canvas canvas = new Canvas(output);

    final int color = 0xff424242;
    final Paint paint = new Paint();
    final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
    final RectF rectF = new RectF(rect);
    final float roundPx = pixels;

    paint.setAntiAlias(true);
    canvas.drawARGB(0, 0, 0, 0);
    paint.setColor(color);
    canvas.drawRoundRect(rectF, roundPx, roundPx, paint);

    paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
    canvas.drawBitmap(bitmap, …
Run Code Online (Sandbox Code Playgroud)

android imageview

28
推荐指数
3
解决办法
6万
查看次数