-1

I am making an app like Instagram in Android Studio using JAVA framework and Firebase for the backend. I want to know how i can make circle image view in it that can be used for profile picture.

Ryan M
  • 18,333
  • 31
  • 67
  • 74
GN Vageesh
  • 322
  • 1
  • 14
  • 2
    Does this answer your question? [Circular Imageview in android](https://stackoverflow.com/questions/43378223/circular-imageview-in-android) – OhhhThatVarun Aug 10 '20 at 14:28

1 Answers1

-1

I do believe you are looking for following result -

enter image description here

You should use a very popular library CircularImageView

Add library to your build.gradle(Module App)

implementation 'com.mikhaellopez:circularimageview:4.2.0'

You can create image view just like you create ImageView in your xml.

<com.mikhaellopez.circularimageview.CircularImageView
    android:layout_width="250dp"
    android:layout_height="250dp"
    android:src="@drawable/image"
    app:civ_border_color="#3f51b5"
    app:civ_border_width="4dp"
    app:civ_shadow="true"
    app:civ_shadow_radius="10"
    app:civ_shadow_color="#3f51b5"/>

In you code you can referance same view as -

CircularImageView circularImageView = findViewById(R.id.circularImageView);

Please check the documentation for more customization.

Happy Coding !

Nikhil Sharma
  • 897
  • 1
  • 4
  • 18
  • Thank a lot for this amazing suggestion. – GN Vageesh Aug 10 '20 at 15:05
  • It helped me to make a basic interface – GN Vageesh Aug 10 '20 at 15:05
  • Glad to help, if this answer solved your problem please mark it as accepted by clicking the check mark next to the answer. see: [How does accepting an answer work?](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) for more information – Nikhil Sharma Aug 10 '20 at 15:14