stovroz
0
Q:

como poner foto en redondo android studio

  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);

      //extraemos el drawable en un bitmap
      Drawable originalDrawable = getResources().getDrawable(R.drawable.image);
      Bitmap originalBitmap = ((BitmapDrawable) originalDrawable).getBitmap();

      //creamos el drawable redondeado
      RoundedBitmapDrawable roundedDrawable =
              RoundedBitmapDrawableFactory.create(getResources(), originalBitmap);

      //asignamos el CornerRadius
      roundedDrawable.setCornerRadius(originalBitmap.getHeight());

      ImageView imageView = (ImageView) findViewById(R.id.imageView);

      imageView.setImageDrawable(roundedDrawable);
  }
0

New to Communities?

Join the community