페이스북 보면 채팅할때 뜨는 챗헤드

조회수 4923회

페이스북 메신저로 채팅할때 화면에 뜨는 챗헤드를 구현하고싶은데 이걸 도와주는 API나 오픈소스가 있을까요?

1 답변

  • 좋아요

    0

    싫어요
    채택 취소하기

    찾아보니까 bubbles-for-android라고 오픈소스가 있네요. https://github.com/txusballesteros/bubbles-for-android

    사용방법은 build.gradle에

    dependencies {
        ...
        compile 'com.txusballesteros:bubbles:1.2.1'
    }
    

    이렇게 해주시고

    <com.txusballesteros.bubbles.BubbleLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    
        <ImageView
            android:id="@+id/avatar"
            android:layout_width="70dp"
            android:layout_height="70dp"
            android:layout_gravity="center"
            android:background="@drawable/profile_decorator"
            android:src="@drawable/profile"
            android:scaleType="centerCrop"/>
    
    </com.txusballesteros.bubbles.BubbleLayout>
    

    이런식으로 쓰시면 됩니다. 자세한거는 관련 링크를 참고하세요.

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)