Christmas Pikachu 안드로이드 원형 프로필 이미지 만든는 방법
개발일지/Android

안드로이드 원형 프로필 이미지 만든는 방법

ZI_CO 2022. 11. 2.

목차

https://github.com/hdodenhof/CircleImageView

구글링하면 어떤 개발자가 코드를 오픈을 해놓은걸 깃에 들어가서 사용해보자

 

 

깃 주소 사이트에 들어가면  이 코드를 build.gradle에 넣어주자

안드로이드 원형 프로필 이미지 만든는 방법

implementation 'de.hdodenhof:circleimageview:3.1.0'

 

안드로이드 원형 프로필 이미지 만든는 방법
그라들(gradle)
안드로이드 원형 프로필 이미지 만든는 방법

 

 

 

 

 

 

 

이코드에서 src에 원하는 이미지를 넣으면 된다.

안드로이드 원형 프로필 이미지 만든는 방법

 

 

 

 

 

 

안드로이드 원형 프로필 이미지 만든는 방법

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    
    <ImageView
        android:layout_width="300dp"
        android:layout_height="300dp"
        android:background="@color/purple_200"
        android:src="@drawable/images" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#E040FB"
        android:orientation="horizontal">

        <de.hdodenhof.circleimageview.CircleImageView 
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="96dp"
            android:layout_height="96dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:src="@drawable/images"
            app:civ_border_color="#FF000000"
            app:civ_border_width="2dp" />

        <de.hdodenhof.circleimageview.CircleImageView 
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="96dp"
            android:layout_height="96dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:src="@drawable/images"
            app:civ_border_color="#FF000000"
            app:civ_border_width="2dp" />

        <de.hdodenhof.circleimageview.CircleImageView 
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:layout_width="96dp"
            android:layout_height="96dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:src="@drawable/images"
            app:civ_border_color="#FF000000"
            app:civ_border_width="2dp" />


    </LinearLayout>


</LinearLayout>

안드로이드 원형 프로필 이미지 만든는 방법

댓글